[FFmpeg-devel] [PATCH] ffprobe: report audio bit rate in stream description

Stefano Sabatini stefasab at gmail.com
Mon Feb 20 17:56:28 CET 2012


On date Saturday 2012-02-18 04:34:30 +0100, Michael Niedermayer encoded:
> On Sat, Feb 18, 2012 at 01:04:48AM +0100, Stefano Sabatini wrote:
> > On date Wednesday 2012-02-15 05:05:50 +0100, Michael Niedermayer encoded:
> > > On Thu, Feb 09, 2012 at 07:06:42PM +0100, Stefano Sabatini wrote:
> > [...]
> > > >  #if FF_API_AVCODEC_OPEN
> > > >  int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
> > > >  {
> > > > @@ -865,6 +888,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
> > > >              avctx->channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
> > > >          }
> > > >      }
> > > > +    if (!avctx->bit_rate)
> > > > +        avctx->bit_rate = get_bit_rate(avctx);
> > > >  
> > > >      avctx->pts_correction_num_faulty_pts =
> > > >      avctx->pts_correction_num_faulty_dts = 0;
> > > 
> > 
> > > iam not sure if this is safe or may interfere with an encoder because
> > > i think this is run also for encoders
> > 
> > Right, added constraint on the codec type, also moved the check
> > *after* the init stage since it seems more correct that way (even if
> > it should make no difference).
> > 
> > > otherwise i think its ok if it passes fate
> > 
> > FATE seems to work here.
> 
> LGTM

Both patches applied.
-- 
FFmpeg = Free and Forgiving Mythic Purposeless Elastic Generator


More information about the ffmpeg-devel mailing list