[gst-cvs] gst-ffmpeg: ffdec: disable interpolation when dropping frames
Wim Taymans
wtay at kemper.freedesktop.org
Tue Sep 1 12:44:14 PDT 2009
Module: gst-ffmpeg
Branch: master
Commit: 46bf3b92d0252b4ea3188d2f77141caacfa05ec4
URL: http://cgit.freedesktop.org/gstreamer/gst-ffmpeg/commit/?id=46bf3b92d0252b4ea3188d2f77141caacfa05ec4
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Tue Sep 1 21:42:26 2009 +0200
ffdec: disable interpolation when dropping frames
When we are dropping frames because of QoS disable the DTS interpolation because
we won't be able to update the timestamps and end up setting the wrong
timestamps. Instead, simply use the timestamps from ffmpeg.
---
ext/ffmpeg/gstffmpegdec.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 2478462..f8345f0 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -1683,6 +1683,14 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
if (len < 0 && (mode_switch || ffmpegdec->context->hurry_up))
len = 0;
+ if (len > 0 && have_data <= 0 && (mode_switch
+ || ffmpegdec->context->hurry_up)) {
+ /* we consumed some bytes but nothing decoded and we are skipping frames,
+ * disable the interpollation of DTS timestamps */
+ ffmpegdec->ts_is_dts = FALSE;
+ ffmpegdec->last_out = -1;
+ }
+
/* no data, we're done */
if (len < 0 || have_data <= 0)
goto beach;
More information about the Gstreamer-commits
mailing list