mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
avcodec/vp3: Don't try to decode VP4 when VP4 decoder is disabled
Otherwise decoding will crash lateron; e.g. because dct_tokens is never set or because a VLC that has not been allocated is used. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
af7468a282
commit
9afb291267
@ -2335,9 +2335,13 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (avctx->codec_tag == MKTAG('V', 'P', '4', '0'))
|
if (avctx->codec_tag == MKTAG('V', 'P', '4', '0')) {
|
||||||
s->version = 3;
|
s->version = 3;
|
||||||
else if (avctx->codec_tag == MKTAG('V', 'P', '3', '0'))
|
#if !CONFIG_VP4_DECODER
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "This build does not support decoding VP4.\n");
|
||||||
|
return AVERROR_DECODER_NOT_FOUND;
|
||||||
|
#endif
|
||||||
|
} else if (avctx->codec_tag == MKTAG('V', 'P', '3', '0'))
|
||||||
s->version = 0;
|
s->version = 0;
|
||||||
else
|
else
|
||||||
s->version = 1;
|
s->version = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user