[FFmpeg-devel] [PATCH] lavc/hevcdec: add ONLY_IF_THREADS_ENABLED where it is missing.

mypopy at gmail.com mypopy at gmail.com
Thu Aug 9 03:54:36 EEST 2018


On Wed, Aug 8, 2018 at 9:50 PM James Almer <jamrial at gmail.com> wrote:

> On 8/8/2018 7:56 AM, Jun Zhao wrote:
> > add add ONLY_IF_THREADS_ENABLED where it is missing.
> >
> > Signed-off-by: Jun Zhao <mypopydev at gmail.com>
> > ---
> >  libavcodec/hevcdec.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> > index 409e77f..fec9218 100644
> > --- a/libavcodec/hevcdec.c
> > +++ b/libavcodec/hevcdec.c
> > @@ -3529,8 +3529,8 @@ AVCodec ff_hevc_decoder = {
> >      .close                 = hevc_decode_free,
> >      .decode                = hevc_decode_frame,
> >      .flush                 = hevc_decode_flush,
> > -    .update_thread_context = hevc_update_thread_context,
> > -    .init_thread_copy      = hevc_init_thread_copy,
> > +    .update_thread_context =
> ONLY_IF_THREADS_ENABLED(hevc_update_thread_context),
> > +    .init_thread_copy      =
> ONLY_IF_THREADS_ENABLED(hevc_init_thread_copy),
> >      .capabilities          = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
> >                               AV_CODEC_CAP_SLICE_THREADS |
> AV_CODEC_CAP_FRAME_THREADS,
> >      .caps_internal         = FF_CODEC_CAP_INIT_THREADSAFE |
> FF_CODEC_CAP_EXPORTS_CROPPING,
>
> You should also wrap the two functions in question with HAVE_THREADS
> checks.
>
> Will update the patch as the comment, Thanks


More information about the ffmpeg-devel mailing list