summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/h263dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/h263dec.c')
-rw-r--r--src/libffmpeg/libavcodec/h263dec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/h263dec.c b/src/libffmpeg/libavcodec/h263dec.c
index 72a43e68f..24b4288e7 100644
--- a/src/libffmpeg/libavcodec/h263dec.c
+++ b/src/libffmpeg/libavcodec/h263dec.c
@@ -105,6 +105,10 @@ static int h263_decode_frame(AVCodecContext *avctx,
if (ret < 0)
return -1;
+ /* make sure we start with an I-Frame */
+ if (!s->slice_height && (s->pict_type != I_TYPE))
+ return -1;
+
MPV_frame_start(s);
#ifdef DEBUG_PRINTS