From a59246c1d198fc378bef477fd4f39477b93b520d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Jul 2011 12:36:42 +0200 Subject: [PATCH] basevideodecoder: Track present position on discont before resetting it --- gst-libs/gst/video/gstbasevideodecoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstbasevideodecoder.c b/gst-libs/gst/video/gstbasevideodecoder.c index 3fd67a145a..f2b2a68ee5 100644 --- a/gst-libs/gst/video/gstbasevideodecoder.c +++ b/gst-libs/gst/video/gstbasevideodecoder.c @@ -1250,12 +1250,13 @@ gst_base_video_decoder_chain (GstPad * pad, GstBuffer * buf) gint64 ts, index; GST_DEBUG_OBJECT (base_video_decoder, "received DISCONT buffer"); - gst_base_video_decoder_flush (base_video_decoder, FALSE); /* track present position */ ts = base_video_decoder->timestamp_offset; index = base_video_decoder->field_index; + gst_base_video_decoder_flush (base_video_decoder, FALSE); + /* buffer may claim DISCONT loudly, if it can't tell us where we are now, * we'll stick to where we were ... * Particularly useful/needed for upstream BYTE based */