aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-03 21:26:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-03 21:36:10 +0100
commit8b73a3f6f6598cb9249034fa020ddead3c943e2f (patch)
tree761e5bfcd76709b46dabca736322a9886723582c /libavformat
parent074155360d28d25701e0cbc7e867bda0e08d9428 (diff)
downloadffmpeg-8b73a3f6f6598cb9249034fa020ddead3c943e2f.tar.gz
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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3bb837a7b2..5637d17cba 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;