Commit 18e0dd05 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e90a6846'

* commit 'e90a6846':
  cavsdec: Make sure a sequence header has been decoded before decoding pictures

See: ec0965beMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ff0a3827 e90a6846
......@@ -948,6 +948,11 @@ static int decode_pic(AVSContext *h)
int ret;
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;
}
av_frame_unref(h->cur.f);
skip_bits(&h->gb, 16);//bbv_dwlay
......@@ -1178,8 +1183,6 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
*got_frame = 0;
if (!h->got_keyframe)
break;
if(!h->top_qp)
break;
init_get_bits(&h->gb, buf_ptr, input_size);
h->stc = stc;
if (decode_pic(h))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment