[FFmpeg-cvslog] In libx264 wrapper, fix side effect with has_b_frames, bframe_pyramid can be set

Baptiste Coudurier git at videolan.org
Sat Apr 23 21:52:34 CEST 2011


ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Sat Apr 23 12:41:11 2011 -0700| [c225615bf2da206775c5ff2b56d648cf50d38756] | committer: Baptiste Coudurier

In libx264 wrapper, fix side effect with has_b_frames, bframe_pyramid can be set
when bframe is not.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c225615bf2da206775c5ff2b56d648cf50d38756
---

 libavcodec/libx264.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index acd1366..1b4e88b 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -366,7 +366,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
         x4->params.b_repeat_headers = 0;
 
     // update AVCodecContext with x264 parameters
-    avctx->has_b_frames = x4->params.i_bframe_pyramid ? 2 : !!x4->params.i_bframe;
+    avctx->has_b_frames = x4->params.i_bframe ?
+        x4->params.i_bframe_pyramid ? 2 : 1 : 0;
     avctx->bit_rate = x4->params.rc.i_bitrate*1000;
     avctx->crf = x4->params.rc.f_rf_constant;
 



More information about the ffmpeg-cvslog mailing list