From 51ef42dd966c7574daf56034902054390727db49 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Tue, 27 Mar 2007 18:00:56 +0000 Subject: 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 * ext/xvid/gstxviddec.c: (gst_xviddec_chain): Add some debug log and fix a stupid output buffer duration bug. --- ChangeLog | 5 +++++ ext/xvid/gstxviddec.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00a610bf..33dfc40f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-27 Julien MOUTTE + + * 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 Patch by: Michal Benes 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); } -- cgit v1.2.1