[FFmpeg-devel] [PATCH v2] avutil/thread: add wrappers for pthread_cond_t and pthread_t functions

James Almer jamrial at gmail.com
Sat Aug 19 01:04:04 EEST 2023


On 8/18/2023 5:16 PM, Michael Niedermayer wrote:
> On Fri, Aug 18, 2023 at 01:14:27PM -0300, James Almer wrote:
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> Now not defining pthread_t when !HAVE_THREADS, like it's done with cond, mutex,
>> and once.
>>
>>   libavutil/thread.h | 30 ++++++++++++++++++++++++++++++
>>   1 file changed, 30 insertions(+)
> 
> this seems not to build on ppc
> AVMutex use before definition
> 
> make
> AR	libavdevice/libavdevice.a
> CC	libavfilter/dnn/dnn_backend_common.o
> In file included from src/libavfilter/dnn/dnn_backend_common.h:29:0,
>                   from src/libavfilter/dnn/dnn_backend_common.c:24:
> src/libavutil/thread.h:193:46: error: unknown type name ‘AVMutex’; did you mean ‘AVFilter’?
>   static inline int ff_cond_wait(AVCond *cond, AVMutex *mutex){ return 0; }
>                                                ^~~~~~~
>                                                AVFilter
> src/libavutil/thread.h:194:51: error: unknown type name ‘AVMutex’; did you mean ‘AVFilter’?
>   static inline int ff_cond_timedwait(AVCond *cond, AVMutex *mutex,
>                                                     ^~~~~~~
>                                                     AVFilter
> src/libavfilter/dnn/dnn_backend_common.c: In function ‘ff_dnn_async_module_cleanup’:
> src/libavfilter/dnn/dnn_backend_common.c:94:11: warning: unused variable ‘status’ [-Wunused-variable]
>       void *status = 0;
>             ^~~~~~
> src/libavfilter/dnn/dnn_backend_common.c: In function ‘ff_dnn_start_inference_async’:
> src/libavfilter/dnn/dnn_backend_common.c:114:11: warning: unused variable ‘status’ [-Wunused-variable]
>       void *status = 0;
>             ^~~~~~
> At top level:
> src/libavfilter/dnn/dnn_backend_common.c:80:14: warning: ‘async_thread_routine’ defined but not used [-Wunused-function]
>   static void *async_thread_routine(void *args)
>                ^~~~~~~~~~~~~~~~~~~~
> src/ffbuild/common.mak:81: recipe for target 'libavfilter/dnn/dnn_backend_common.o' failed
> make: *** [libavfilter/dnn/dnn_backend_common.o] Error 1

Should be fixed in v3.


More information about the ffmpeg-devel mailing list