mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/utils: never decrease has_b_frames in compute_pkt_fields()
The intent of the original check was to increase has_b_frames when it was incorrectly set to 0. Later codecs allowed larger values Found-by: divVerent Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
074155360d
commit
8b73a3f6f6
@ -1039,7 +1039,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
||||
if((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
|
||||
pkt->dts= AV_NOPTS_VALUE;
|
||||
|
||||
if (st->codec->codec_id != AV_CODEC_ID_H264 && pc && pc->pict_type == AV_PICTURE_TYPE_B)
|
||||
if (pc && pc->pict_type == AV_PICTURE_TYPE_B
|
||||
&& !st->codec->has_b_frames)
|
||||
//FIXME Set low_delay = 0 when has_b_frames = 1
|
||||
st->codec->has_b_frames = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user