diff options
Diffstat (limited to 'gst-libs/ext/libav/libavcodec/cavsdec.c')
-rw-r--r-- | gst-libs/ext/libav/libavcodec/cavsdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst-libs/ext/libav/libavcodec/cavsdec.c b/gst-libs/ext/libav/libavcodec/cavsdec.c index cef6b95..7cfb2ca 100644 --- a/gst-libs/ext/libav/libavcodec/cavsdec.c +++ b/gst-libs/ext/libav/libavcodec/cavsdec.c @@ -931,6 +931,11 @@ static int decode_pic(AVSContext *h) int skip_count = -1; enum cavs_mb mb_type; + if (!h->top_qp) { + av_log(h->avctx, AV_LOG_ERROR, "No sequence header decoded yet\n"); + return AVERROR_INVALIDDATA; + } + skip_bits(&h->gb, 16);//bbv_dwlay if (h->stc == PIC_PB_START_CODE) { h->cur.f->pict_type = get_bits(&h->gb, 2) + AV_PICTURE_TYPE_I; |