[FFmpeg-cvslog] h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1.
Ronald S. Bultje
git at videolan.org
Fri Dec 2 01:00:55 CET 2011
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Thu Dec 1 12:45:10 2011 -0800| [2574f08d4c30b37e39650a3b3d1970f75f3170cd] | committer: Ronald S. Bultje
h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1.
This prevents frame allocation overflows, and fixed
fate-h264-conformance-mr3_tandberg_b with 2 threads.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2574f08d4c30b37e39650a3b3d1970f75f3170cd
---
libavcodec/h264.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index ad1ab69..96062b7 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1438,7 +1438,7 @@ static void decode_postinit(H264Context *h, int setup_finished){
if( s->avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT
&& !h->sps.bitstream_restriction_flag){
- s->avctx->has_b_frames= MAX_DELAYED_PIC_COUNT;
+ s->avctx->has_b_frames = MAX_DELAYED_PIC_COUNT - 1;
s->low_delay= 0;
}
More information about the ffmpeg-cvslog
mailing list