Module: libav
Branch: master
Commit: e6b1c3bbe7082c71ea8ee8ac83698c156c9e4838

Author:    Anton Khirnov <[email protected]>
Committer: Anton Khirnov <[email protected]>
Date:      Fri Dec 28 09:54:29 2012 +0100

pthread: make ff_thread_release_buffer idempotent.

I.e. don't do anything on already released frames.

---

 libavcodec/pthread.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 73d9da3..cd44b8c 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -975,6 +975,9 @@ void ff_thread_release_buffer(AVCodecContext *avctx, 
AVFrame *f)
     PerThreadContext *p = avctx->thread_opaque;
     FrameThreadContext *fctx;
 
+    if (!f->data[0])
+        return;
+
     if (!(avctx->active_thread_type&FF_THREAD_FRAME)) {
         avctx->release_buffer(avctx, f);
         return;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to