ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Thu May  1 22:50:00 2025 +0200| [bc81a797c47257d51111f24753544ee314f50d18] | 
committer: Andreas Rheinhardt

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.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc81a797c47257d51111f24753544ee314f50d18
---

 libavcodec/mpeg4video_parser.c | 1 +
 libavcodec/mpeg4videodec.c     | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c
index ef9ea923f6..de92f1b1dc 100644
--- a/libavcodec/mpeg4video_parser.c
+++ b/libavcodec/mpeg4video_parser.c
@@ -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);
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 8bdc82b9a9..d5979096ae 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -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) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to