mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 06:58:45 +08:00
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:
@ -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);
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user