[Ffmpeg-devel] low_delay and has_b_frames

Baptiste Coudurier baptiste.coudurier
Sat Nov 11 15:45:06 CET 2006


Baptiste Coudurier a ?crit :
> Hi
> 
> I noticed that even when using -intra, encoder avctx has has_b_frames
> set to 1.
> 
> I checked mpegvideo.c and indeed:
> 
> @@ -1169,12 +1169,12 @@
>      switch(avctx->codec->id) {
>      case CODEC_ID_MPEG1VIDEO:
>          s->out_format = FMT_MPEG1;
> -        s->low_delay= 0; //s->max_b_frames ? 0 : 1;
> +        s->low_delay= s->max_b_frames ? 0 : 1;
>          avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1);
>          break;
>      case CODEC_ID_MPEG2VIDEO:
>          s->out_format = FMT_MPEG1;
> -        s->low_delay= 0; //s->max_b_frames ? 0 : 1;
> +        s->low_delay= s->max_b_frames ? 0 : 1;
>          avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1);
>          s->rtp_mode= 1;
>          break;
> 
> later:
>     avctx->has_b_frames= !s->low_delay;
> 
> What is the reason behind not using max_b_frames ?
> Should I modify has_b_frames set by taking max_b_frames into account ?
> 

Ping, any idea ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no




More information about the ffmpeg-devel mailing list