avutil/threadmessage: fix error return in case of av_fifo_alloc failure
authorAleksandr Slobodeniuk <alenuke@yandex.ru>
Wed, 12 Jul 2017 18:41:56 +0000 (21:41 +0300)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 14 Jul 2017 00:30:37 +0000 (02:30 +0200)
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/threadmessage.c

index 7c5cd24..872e939 100644 (file)
@@ -69,7 +69,7 @@ int av_thread_message_queue_alloc(AVThreadMessageQueue **mq,
         pthread_cond_destroy(&rmq->cond_recv);
         pthread_mutex_destroy(&rmq->lock);
         av_free(rmq);
-        return AVERROR(ret);
+        return AVERROR(ENOMEM);
     }
     rmq->elsize = elsize;
     *mq = rmq;