Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: libavcodec/pthread.c

Issue 9373002: Fix valgrind and asan memory leaks and crashes. (Closed) Base URL: ssh://gerrit.chromium.org:29418/chromium/third_party/ffmpeg.git@master
Patch Set: Notes. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | libavcodec/utils.c » ('j') | libavformat/oggparsetheora.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libavcodec/pthread.c
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 6ae763da8045e839b3859ad65f8cb5117b6bd871..e90a0a02888602e7993d093b01d0bcfbf285e9cb 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -610,6 +610,7 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
* Submit a packet to the next decoding thread.
*/
+ if (fctx->next_decoding >= avctx->thread_count) return err;
DaleCurtis 2012/02/09 22:43:26 Proper fix is likely related to acolwell's threadi
rbultje1 2012/02/09 23:28:46 This looks really evil, I'm OK with the workaround
DaleCurtis 2012/02/10 00:04:01 I've commented on valgrind.txt to link each test f
p = &fctx->threads[fctx->next_decoding];
err = update_context_from_user(p->avctx, avctx);
if (err) return err;
« no previous file with comments | « no previous file | libavcodec/utils.c » ('j') | libavformat/oggparsetheora.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698