[FFmpeg-devel] [PATCH] Make ffplay define in the encoder the number of threads *before* to open it

Michael Niedermayer michaelni
Mon Dec 28 00:05:14 CET 2009


On Sun, Mar 09, 2008 at 02:59:30PM +0100, Stefano Sabatini wrote:
> On date Saturday 2008-03-08 21:03:17 +0100, Michael Niedermayer encoded:
> > On Sat, Mar 08, 2008 at 06:33:27PM +0100, Stefano Sabatini wrote:
> > [...
> > > Index: ffplay.c
> > > ===================================================================
> > > --- ffplay.c	(revision 12367)
> > > +++ ffplay.c	(working copy)
> > > @@ -1713,6 +1713,7 @@
> > >      enc->skip_loop_filter= skip_loop_filter;
> > >      enc->error_resilience= error_resilience;
> > >      enc->error_concealment= error_concealment;
> > > +    enc->thread_count= thread_count;
> > >      if (!codec ||
> > >          avcodec_open(enc, codec) < 0)
> > >          return -1;
> > > @@ -1735,7 +1736,6 @@
> > >  
> > >      if(thread_count>1)
> > >          avcodec_thread_init(enc, thread_count);
> > > -    enc->thread_count= thread_count;
> > 
> > wherver this line is moved the avcodec_thread_init should move as well
> > Though maybe the "enc->thread_count= thread_count;" line can be removed
> [...]
> 
> Fixed, it works with both threads enabled and disabled.
> 
> Without threads enabled enc->thread_count isn't set, so it defaults to the sane
> value of 1.
> 
> Best regards.
> -- 
> Stefano Sabatini
> Linux user number 337176 (see http://counter.li.org)

>  ffplay.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 8b6cacb69ff60cebbcbb444525d8e8ac46a164b3  make-ffplay-init-threads-num-before-opening-codec-01.patch

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091228/1c4d9cca/attachment.pgp>



More information about the ffmpeg-devel mailing list