summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-07-17 16:17:54 +0200
committerTim-Philipp Müller <tim@centricular.net>2013-07-17 19:33:36 +0100
commitb31e84d5f7c4c6eddcf1b955d131d223fa1929c0 (patch)
tree24271aa6cb282784fd547c54c2232f7cfdf21bcf
parent9feb8003ef65a3e650e54986d95aef12902434e7 (diff)
mpeg2dec: fix crash on resolution changes
Properly reset on sequence changes, otherwise we end up using stray data/buffers. https://bugzilla.gnome.org/show_bug.cgi?id=690701
-rw-r--r--ext/mpeg2dec/gstmpeg2dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c
index dd1003b5..96a0b113 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: