[FFmpeg-cvslog] vaapi_h264: Set max_num_ref_frames to 1 when not using B frames

Mark Thompson git at videolan.org
Tue Mar 21 15:59:48 EET 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Tue Sep 27 19:08:42 2016 +0100| [956a54129db522998a5abae869568dae2c9774cb] | committer: Mark Thompson

vaapi_h264: Set max_num_ref_frames to 1 when not using B frames

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

 libavcodec/vaapi_encode_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 0cd966f..020f892 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -778,7 +778,7 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
 
         vseq->level_idc = avctx->level;
 
-        vseq->max_num_ref_frames = 2;
+        vseq->max_num_ref_frames = 1 + (avctx->max_b_frames > 0);
 
         vseq->picture_width_in_mbs  = priv->mb_width;
         vseq->picture_height_in_mbs = priv->mb_height;



More information about the ffmpeg-cvslog mailing list