From 576fe462bc51a2d2f71236cf95777be061ee2fae Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 17 Jul 2013 16:17:54 +0200 Subject: [PATCH] mpeg2dec: Properly reset on sequence changes Otherwise we end up using stray data/buffers. Fixes #690701 --- ext/mpeg2dec/gstmpeg2dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c index 87308dd186..502910e81f 100644 --- a/ext/mpeg2dec/gstmpeg2dec.c +++ b/ext/mpeg2dec/gstmpeg2dec.c @@ -984,6 +984,8 @@ gst_mpeg2dec_handle_frame (GstVideoDecoder * decoder, #if MPEG2_RELEASE >= MPEG2_VERSION (0, 5, 0) case STATE_SEQUENCE_MODIFIED: GST_DEBUG_OBJECT (mpeg2dec, "sequence modified"); + mpeg2dec->discont_state = MPEG2DEC_DISC_NEW_PICTURE; + gst_mpeg2dec_clear_buffers (mpeg2dec); /* fall through */ #endif case STATE_SEQUENCE: