mpeg2dec: Properly reset on sequence changes

Otherwise we end up using stray data/buffers.

Fixes #690701
This commit is contained in:
Edward Hervey 2013-07-17 16:17:54 +02:00
parent cfb87c7638
commit 576fe462bc

View file

@ -984,6 +984,8 @@ gst_mpeg2dec_handle_frame (GstVideoDecoder * decoder,
#if MPEG2_RELEASE >= MPEG2_VERSION (0, 5, 0) #if MPEG2_RELEASE >= MPEG2_VERSION (0, 5, 0)
case STATE_SEQUENCE_MODIFIED: case STATE_SEQUENCE_MODIFIED:
GST_DEBUG_OBJECT (mpeg2dec, "sequence modified"); GST_DEBUG_OBJECT (mpeg2dec, "sequence modified");
mpeg2dec->discont_state = MPEG2DEC_DISC_NEW_PICTURE;
gst_mpeg2dec_clear_buffers (mpeg2dec);
/* fall through */ /* fall through */
#endif #endif
case STATE_SEQUENCE: case STATE_SEQUENCE: