mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
cavsdec: Make sure a sequence header has been decoded before decoding pictures
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
5bbfe193a0
commit
e90a6846c2
@ -931,6 +931,11 @@ static int decode_pic(AVSContext *h)
|
|||||||
int skip_count = -1;
|
int skip_count = -1;
|
||||||
enum cavs_mb mb_type;
|
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);
|
av_frame_unref(h->cur.f);
|
||||||
|
|
||||||
skip_bits(&h->gb, 16);//bbv_dwlay
|
skip_bits(&h->gb, 16);//bbv_dwlay
|
||||||
|
Loading…
Reference in New Issue
Block a user