diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-12-28 09:54:29 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-01-29 07:32:10 +0100 |
commit | e6b1c3bbe7082c71ea8ee8ac83698c156c9e4838 (patch) | |
tree | 412960bbe5347d8a291a7c4c644f8f1aec6e504e /libavcodec/pthread.c | |
parent | 729b37149c9cbef77d5ad75d91017af3b9084577 (diff) | |
download | ffmpeg-e6b1c3bbe7082c71ea8ee8ac83698c156c9e4838.tar.gz |
pthread: make ff_thread_release_buffer idempotent.
I.e. don't do anything on already released frames.
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r-- | libavcodec/pthread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 73d9da3f1c..cd44b8c73b 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; |