Commit 51ef42dd authored by Julien Moutte Moutte's avatar Julien Moutte Moutte

ext/xvid/gstxviddec.c: Add some debug log and fix a stupid output buffer duration bug.

Original commit message from CVS:
2007-03-27  Julien MOUTTE  <julien@moutte.net>

* ext/xvid/gstxviddec.c: (gst_xviddec_chain): Add some
debug log and fix a stupid output buffer duration bug.
parent 759b1776
2007-03-27 Julien MOUTTE <julien@moutte.net>
* ext/xvid/gstxviddec.c: (gst_xviddec_chain): Add some
debug log and fix a stupid output buffer duration bug.
2007-03-25 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Michal Benes <michal.benes at itonis tv>
......
......@@ -325,8 +325,10 @@ gst_xviddec_chain (GstPad * pad, GstBuffer * buf)
fret = GST_FLOW_OK;
GST_LOG_OBJECT (dec, "Received buffer of time %" GST_TIME_FORMAT ", size %d",
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_BUFFER_SIZE (buf));
GST_LOG_OBJECT (dec, "Received buffer of time %" GST_TIME_FORMAT
" duration %" GST_TIME_FORMAT ", size %d",
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_SIZE (buf));
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) {
/* FIXME: should we do anything here, like flush the decoder? */
......@@ -394,7 +396,10 @@ gst_xviddec_chain (GstPad * pad, GstBuffer * buf)
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buf);
}
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (dec->srcpad));
GST_LOG_OBJECT (dec, "pushing buffer with pts %" GST_TIME_FORMAT
" duration %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
fret = gst_pad_push (dec->srcpad, outbuf);
} else { /* no real output yet, delay in frames being returned */
......@@ -405,7 +410,7 @@ gst_xviddec_chain (GstPad * pad, GstBuffer * buf)
} else {
dec->have_ts = TRUE;
dec->next_ts = GST_BUFFER_TIMESTAMP (buf);
dec->next_dur = GST_BUFFER_TIMESTAMP (buf);
dec->next_dur = GST_BUFFER_DURATION (buf);
}
gst_buffer_unref (outbuf);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment