[FFmpeg-devel] [PATCH] Make ffplay define in the encoder the number of threads *before* to open it
Michael Niedermayer
michaelni
Sat Mar 8 20:51:36 CET 2008
On Sat, Mar 08, 2008 at 07:25:49PM +0100, Stefano Sabatini wrote:
> On date Saturday 2008-03-08 18:55:26 +0100, Michael Niedermayer encoded:
> > On Sat, Mar 08, 2008 at 06:33:27PM +0100, Stefano Sabatini wrote:
> > > Hi,
> > > as in $subject.
> > >
> > > If threads support is not enabled and threads count is set to a
> > > value greater than MAX_THREADS (currently is 8), then encoder is
> > > initialized with a value of thread_count equal to 1, then
> > > enc->threads_count is set to the value set by the user, finally
> > > libavcodec crashes when it tryies to free the first thread beyond
> > > MAX_THREADS (this happens when quitting ffplay).
> >
> > the command line parsing code should not accept >MAX_THREADS
> [...]
>
> I agree, but MAX_THREADS is defined in libavcodec/mpegvideo.h, which
> is not public, furthermore the patch implements the correct behaviour
> for opening an encoder so I'd like to see it applied.
>
> For what regards the MAX_THREADS declaration we could export it in
> libavcodec/avcodec.h, then make opt_threads_count refuse to accept
> values greater than MAX_THREADS (same in ffmpeg.c).
ffplay should use AVOptions and the array in utils.c should use MAX_THREADS
as max
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20080308/f890129c/attachment.pgp>
More information about the ffmpeg-devel
mailing list