diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-05 22:49:21 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-09 08:16:25 +0100 |
commit | ca9586375828bbb4d8ef7eeeb3ad3b55116c6fd7 (patch) | |
tree | 9bf243d26fee207e2076972fa4e9b805a50315ec | |
parent | 38f234c06ee0d98c3568120338c1ec4078f8f9cc (diff) |
avcodec/vc1dec: Don't call ff_get_format() twice
It is currently called once in the codecs' init function
and once when (re)initializing the VC-1 decode context
(which happens upon frame size changes as well as before
decoding the first frame). The first one is unnecessary
now that vc1_decode_frame() no longer requires avctx->hwaccel
to be already set for hwaccel to work properly.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/vc1dec.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 6462a40fd3..4f4aa8aa07 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -691,14 +691,6 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) if (v->profile == PROFILE_ADVANCED) avctx->level = v->level; - if (!CONFIG_GRAY || !(avctx->flags & AV_CODEC_FLAG_GRAY)) - avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts); - else { - avctx->pix_fmt = AV_PIX_FMT_GRAY8; - if (avctx->color_range == AVCOL_RANGE_UNSPECIFIED) - avctx->color_range = AVCOL_RANGE_MPEG; - } - ff_blockdsp_init(&s->bdsp); ff_h264chroma_init(&v->h264chroma, 8); |