diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/xvid/gstxviddec.c | 13 |
2 files changed, 14 insertions, 4 deletions
@@ -1,3 +1,8 @@ +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> diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c index 7e668186..40ec52be 100644 --- a/ext/xvid/gstxviddec.c +++ b/ext/xvid/gstxviddec.c @@ -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); } |