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

Unified Diff: source/patched-ffmpeg-mt/libavcodec/pthread.c

Issue 6588036: Merge 76138 - Properly account the thread index on all exit paths from the fu... (Closed) Base URL: svn://chrome-svn/chrome/branches/ffmpeg/648/
Patch Set: Created 9 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 | « patches/to_upstream/24_thread_index.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/patched-ffmpeg-mt/libavcodec/pthread.c
===================================================================
--- source/patched-ffmpeg-mt/libavcodec/pthread.c (revision 76144)
+++ source/patched-ffmpeg-mt/libavcodec/pthread.c (working copy)
@@ -448,9 +448,11 @@
if (err) return err;
fctx->next_decoding++;
+ int decoding_save = fctx->next_decoding;
+ if (fctx->next_decoding >= thread_count) fctx->next_decoding = 0;
if (fctx->delaying && avpkt->size) {
- if (fctx->next_decoding >= (thread_count-1)) fctx->delaying = 0;
+ if (decoding_save >= (thread_count-1)) fctx->delaying = 0;
*got_picture_ptr=0;
return 0;
@@ -479,7 +481,6 @@
update_thread_context_from_copy(avctx, p->avctx, 1);
- if (fctx->next_decoding >= thread_count) fctx->next_decoding = 0;
fctx->next_finished = returning_thread;
return p->result;
« no previous file with comments | « patches/to_upstream/24_thread_index.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698