[FFmpeg-devel] [PATCH, v3] lavc/pthread_frame: update context in child thread in multi-thread mode
Fu, Linjie
linjie.fu at intel.com
Fri Jun 28 04:57:55 EEST 2019
> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Carl Eugen Hoyos
> Sent: Thursday, June 27, 2019 20:32
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH, v3] lavc/pthread_frame: update
> context in child thread in multi-thread mode
>
> Am Do., 27. Juni 2019 um 13:56 Uhr schrieb Linjie Fu <linjie.fu at intel.com>:
>
> > libavcodec/internal.h | 7 +++++++
> > libavcodec/pthread_frame.c | 21 ++++++++++++++++++---
> > 2 files changed, 25 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavcodec/internal.h b/libavcodec/internal.h
> > index 5096ffa..a85ffff 100644
> > --- a/libavcodec/internal.h
> > +++ b/libavcodec/internal.h
> > @@ -162,6 +162,13 @@ typedef struct AVCodecInternal {
> >
> > void *thread_ctx;
> >
> > + /**
> > + * User thread AVCodecContext pointer and
> > + * context mutex
> > + */
> > + void *user_avctx;
>
> Sorry if this was already answered:
> Why is this not an AVCodecContext* ?
Followed the behavior of :
void *thread_ctx;
void *frame_thread_encoder
Since it will only be used as AVCodecContext* (not like void *hwaccel_priv_data)
AVCodecContext *user_avctx seems to be more directly.
I'm not strongly insist on this unless there are some other concerns or differents.
More information about the ffmpeg-devel
mailing list