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>
This commit is contained in:
Andreas Rheinhardt 2024-02-05 22:49:21 +01:00
parent 38f234c06e
commit ca95863758
1 changed files with 0 additions and 8 deletions

View File

@ -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);