[FFmpeg-devel] [PATCH] avformat/utils: improve get duration

平凯 pingkai010 at gmail.com
Thu May 30 18:20:11 CEST 2013


I have done it. And I have resend the patch.
在 2013-5-30 下午11:26,"Clément Boesch" <ubitux at gmail.com>写道:

> On Thu, May 30, 2013 at 11:20:22PM +0800, Ping Kai wrote:
> > improve the accuracy of getting
> > duration from bit rate.
> >
> > Signed-off-by: Ping Kai <pingkai010 at gmail.com>
>
> No need to send the patch twice.
>
> > ---
> >  libavformat/utils.c |   19 +++++++++++++++++--
> >  1 file changed, 17 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavformat/utils.c b/libavformat/utils.c
> > index baa7177..3a06a85 100644
> > --- a/libavformat/utils.c
> > +++ b/libavformat/utils.c
> > @@ -2775,7 +2775,11 @@ int avformat_find_stream_info(AVFormatContext
> *ic, AVDictionary **options)
> >      int64_t old_offset = avio_tell(ic->pb);
> >      int orig_nb_streams = ic->nb_streams;        // new streams might
> appear, no options for those
> >      int flush_codecs = ic->probesize > 0;
> > +    int64_t *pSampleBitRateSum = (int64_t *)av_malloc(ic->nb_streams *
> sizeof(int64_t));
>
> Please follow the surrounding coding style (check the variable names).
> Don't cast your malloc, it's not C++ code.
>
> [...]
>
> --
> Clément B.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


More information about the ffmpeg-devel mailing list