[vlc-devel] [PATCH 1/1] avcodec: hw accel with frame multithreading works since libavcodec 55.01.00

Jean-Baptiste Kempf jb at videolan.org
Wed Mar 27 12:05:00 CET 2013


On 27 Mar, Janne Grunau wrote :
> On 2013-03-27 08:43:47 +0100, Rémi Denis-Courmont wrote:
> > On Tue, 26 Mar 2013 20:25:00 +0100, Janne Grunau <janne-vlc at jannau.net>
> > wrote:
> > > diff --git a/modules/codec/avcodec/video.c
> > b/modules/codec/avcodec/video.c
> > > index 7697ef9..7bcae64 100644
> > > --- a/modules/codec/avcodec/video.c
> > > +++ b/modules/codec/avcodec/video.c
> > > @@ -342,7 +342,8 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext
> > > *p_context,
> > >           i_codec_id == AV_CODEC_ID_VC1 || i_codec_id ==
> > AV_CODEC_ID_WMV3)
> > >           )
> > >      {
> > >  #ifdef HAVE_AVCODEC_MT
> > > -        if( p_sys->p_context->thread_type & FF_THREAD_FRAME )
> > > +        if( p_sys->p_context->thread_type & FF_THREAD_FRAME &&
> > > +            LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 1, 0))
> > 
> > Why not use the preprocessor instead?
> 
> no reason. just libav's style to handle it this way and rely on the
> compiler's dead code elimination. I can resubmit with the code enclosed
> in #if/#endif if you prefer that.
> 

Seeing that the ifdef HAVE_AVCODEC_MT is just above, it would make more
sense to merge them

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list