mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-25 00:06:58 +00:00
avcodec/mpeg12dec: do not trust AVCodecContext input dimensions
Fixes initial wtv dimensions Fixes Ticket4070 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f2ffaae9ac
commit
77f1199e8f
@ -1120,6 +1120,10 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
|
|||||||
MpegEncContext *s2 = &s->mpeg_enc_ctx;
|
MpegEncContext *s2 = &s->mpeg_enc_ctx;
|
||||||
|
|
||||||
ff_mpv_decode_defaults(s2);
|
ff_mpv_decode_defaults(s2);
|
||||||
|
|
||||||
|
if ( avctx->codec_tag != AV_RL32("VCR2")
|
||||||
|
&& avctx->codec_tag != AV_RL32("BW10"))
|
||||||
|
avctx->coded_width = avctx->coded_height = 0; // do not trust dimensions from input
|
||||||
ff_mpv_decode_init(s2, avctx);
|
ff_mpv_decode_init(s2, avctx);
|
||||||
|
|
||||||
s->mpeg_enc_ctx.avctx = avctx;
|
s->mpeg_enc_ctx.avctx = avctx;
|
||||||
|
Loading…
Reference in New Issue
Block a user