[FFmpeg-devel] vp9: fix compilation with threading disabled.

Submitted by Ronald S. Bultje on Sept. 9, 2017, 4:13 p.m.

Details

Message ID 1504973581-1540-1-git-send-email-rsbultje@gmail.com
State New
Headers show

Commit Message

Ronald S. Bultje Sept. 9, 2017, 4:13 p.m.
---
 libavcodec/vp9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Sept. 9, 2017, 6:26 p.m.
On Sat, Sep 09, 2017 at 12:13:01PM -0400, Ronald S. Bultje wrote:
> ---
>  libavcodec/vp9.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

works

thanks

[...]
Ronald S. Bultje Sept. 10, 2017, 3:25 a.m.
Hi,

On Sat, Sep 9, 2017 at 2:26 PM, Michael Niedermayer <michael@niedermayer.cc>
wrote:

> On Sat, Sep 09, 2017 at 12:13:01PM -0400, Ronald S. Bultje wrote:
> > ---
> >  libavcodec/vp9.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> works
>
> thanks


Doesn't actually work for me, for some reason --disable-pthreads also
removes the #include <pthread.h>, causing pthread_*_t to not be defined.
New patch (little more invasive, sadly) sent that works for me after some
testing...

Ronald

Patch hide | download patch | download mbox

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index a71045e..499f357 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -1599,7 +1599,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
             s->td[i].uveob[1] = s->td[i].uveob_base[1];
         }
 
-        if (avctx->active_thread_type == FF_THREAD_SLICE) {
+        if (HAVE_THREADS && avctx->active_thread_type == FF_THREAD_SLICE) {
             int tile_row, tile_col;
 
             assert(!pass);