changeset 3653:4a78757f28bc libavcodec

fix b pyramid in mp4 muxing if no dts are provided to the muxer
author michael
date Wed, 30 Aug 2006 21:18:17 +0000
parents d170a32e985c
children 565d9ddd8eb3
files x264.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/x264.c	Tue Aug 29 21:23:27 2006 +0000
+++ b/x264.c	Wed Aug 30 21:18:17 2006 +0000
@@ -160,6 +160,7 @@
     x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
     x4->params.i_bframe_bias = avctx->bframebias;
     x4->params.b_bframe_pyramid = (avctx->flags2 & CODEC_FLAG2_BPYRAMID);
+    avctx->has_b_frames= (avctx->flags2 & CODEC_FLAG2_BPYRAMID) ? 2 : !!avctx->max_b_frames;
 
     x4->params.i_keyint_min = avctx->keyint_min;
     if(x4->params.i_keyint_min > x4->params.i_keyint_max)