diff --git a/libavformat/utils.c b/libavformat/utils.c index 1e8a2f4280..f46be17860 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -770,7 +770,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, int num, den, presentation_delayed, delay, i; int64_t offset; - if (pc && pc->pict_type == FF_B_TYPE) + if (st->codec->codec_id != CODEC_ID_H264 && pc && pc->pict_type == FF_B_TYPE) st->codec->has_b_frames = 1; /* do we have a video B-frame ? */