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> (cherry picked from commit e90a6846c2c006fbebd00e1f2789f4a86fafacef) Signed-off-by: Luca Barbato <lu_zero@gentoo.org> Conflicts: libavcodec/cavsdec.c
This commit is contained in:
parent
b9e90b36cd
commit
7f80928c0e
@ -467,6 +467,11 @@ static int decode_pic(AVSContext *h) {
|
||||
int skip_count = -1;
|
||||
enum cavs_mb mb_type;
|
||||
|
||||
if (!h->top_qp) {
|
||||
av_log(h, AV_LOG_ERROR, "No sequence header decoded yet\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (!s->context_initialized) {
|
||||
s->avctx->idct_algo = FF_IDCT_CAVS;
|
||||
if (MPV_common_init(s) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user