summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2012-06-17 20:27:33 +1000
committerJan Schmidt <thaytan@noraisin.net>2012-06-20 01:57:21 +1000
commit07a16d541d9ac319d40e796950c97640e45ee863 (patch)
treea3b3db9927b3ca57d4d0edafc93125b52ca30f96
parentdb4e440d385c2e5583dfdf1ef22b5719e447c7aa (diff)
downloadgstreamer-plugins-base-07a16d541d9ac319d40e796950c97640e45ee863.tar.gz
videodecoder: Clear the last_out_frame_number when flushing
Don't mis-detect reordered output after a seek. Instead, clear the last_out_frame_number to an invalid value and wait for at least one frame.
-rw-r--r--gst-libs/gst/video/gstvideodecoder.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
index 650c51814..df1ba5a9f 100644
--- a/gst-libs/gst/video/gstvideodecoder.c
+++ b/gst-libs/gst/video/gstvideodecoder.c
@@ -1546,7 +1546,7 @@ gst_video_decoder_reset (GstVideoDecoder * decoder, gboolean full)
priv->base_timestamp = GST_CLOCK_TIME_NONE;
priv->last_timestamp_in = GST_CLOCK_TIME_NONE;
priv->last_timestamp_out = GST_CLOCK_TIME_NONE;
- priv->last_out_frame_number = 0;
+ priv->last_out_frame_number = (guint) (-1);
priv->reordered_output = FALSE;
priv->reordered_input = FALSE;
@@ -1989,6 +1989,7 @@ gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
(priv->reorder_idx_out + 1) % MAX_DTS_PTS_REORDER_DEPTH;
if (!priv->reordered_output && frame->system_frame_number &&
+ priv->last_out_frame_number != (guint) (-1) &&
frame->system_frame_number != (priv->last_out_frame_number + 1)) {
GST_DEBUG_OBJECT (decoder, "Detected reordered output");
priv->reordered_output = TRUE;