On Tue, 06 Dec 2011 10:30:11 +0000, Måns Rullgård <[email protected]> wrote:
> Anton Khirnov <[email protected]> writes:
> 
> > Fixes avformat_find_stream_info() on streams with number of frames <
> > thread count.
> > ---
> >  libavformat/utils.c |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavformat/utils.c b/libavformat/utils.c
> > index ea075e7..a4985da 100644
> > --- a/libavformat/utils.c
> > +++ b/libavformat/utils.c
> > @@ -2292,6 +2292,11 @@ int avformat_find_stream_info(AVFormatContext *ic, 
> > AVDictionary **options)
> >          assert(!st->codec->codec);
> >          codec = avcodec_find_decoder(st->codec->codec_id);
> >  
> > +        /* this function doesn't flush the decoders, so force thread count
> > +         * to 1 to fix behavior when thread count > number of frames in 
> > the file */
> 
> Why is it not fixed to flush the decoders?

More work ;)
And I wasn't sure there's any advantage to that.

> Although single-threaded is
> probably preferable here (a single frame is usually all that's
> required), won't this still fail if the stream is shorter than the
> nominal decoder delay (e.g. single-frame MPEG2)?

I suppose it will, if there's always a delay.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to