diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-22 02:11:15 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-12 11:44:03 +0200 |
commit | 5ea7c0e323b58388e84fd6a329a26cfa2681be5b (patch) | |
tree | 24e497b631e6eb237f5e6efb0b2806f41a4bcb6d | |
parent | bbe10bcae84dd5ee30f2df464299c4f3d14b3042 (diff) | |
download | ffmpeg-5ea7c0e323b58388e84fd6a329a26cfa2681be5b.tar.gz |
avcodec/mpeg12dec: Set out_format only once
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/mpeg12dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 002ddfe72b..3a86896582 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -794,6 +794,8 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx) Mpeg1Context *s = avctx->priv_data; MpegEncContext *s2 = &s->mpeg_enc_ctx; + s2->out_format = FMT_MPEG1; + 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 @@ -1859,7 +1861,6 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, s->chroma_format = 1; s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO; - s->out_format = FMT_MPEG1; if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY) s->low_delay = 1; @@ -1877,7 +1878,6 @@ static int vcr2_init_sequence(AVCodecContext *avctx) int i, v, ret; /* start new MPEG-1 context decoding */ - s->out_format = FMT_MPEG1; if (s->context_initialized) ff_mpv_common_end(s); |