avcodec/mpeg4videodec: Move setting has_b_frames to mpeg4video_parser.c

ff_h263_decode_frame() already does it generically for the decoder.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-05-01 22:50:00 +02:00
parent 2865ebd1fb
commit bc81a797c4
2 changed files with 1 additions and 1 deletions

View File

@ -99,6 +99,7 @@ static int mpeg4_decode_header(AVCodecParserContext *s1, AVCodecContext *avctx,
init_get_bits(gb, buf, 8 * buf_size);
ret = ff_mpeg4_parse_picture_header(dec_ctx, gb, 0, 1);
avctx->has_b_frames = !s->low_delay;
if (s->width && (!avctx->width || !avctx->height ||
!avctx->coded_width || !avctx->coded_height)) {
ret = ff_set_dimensions(avctx, s->width, s->height);

View File

@ -3676,7 +3676,6 @@ int ff_mpeg4_parse_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb,
end:
if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
s->avctx->has_b_frames = !s->low_delay;
if (s->studio_profile) {
if (!s->avctx->bits_per_raw_sample) {