OLD | NEW |
(Empty) | |
| 1 diff -wurp -N orig/libavcodec/pthread.c ffmpeg-mt/libavcodec/pthread.c |
| 2 --- orig/libavcodec/pthread.c 2011-02-25 04:09:50.973123996 -0800 |
| 3 +++ ffmpeg-mt/libavcodec/pthread.c 2011-02-25 04:10:23.563063084 -0800 |
| 4 @@ -448,9 +448,11 @@ int ff_thread_decode_frame(AVCodecContex |
| 5 if (err) return err; |
| 6 |
| 7 fctx->next_decoding++; |
| 8 + int decoding_save = fctx->next_decoding; |
| 9 + if (fctx->next_decoding >= thread_count) fctx->next_decoding = 0; |
| 10 |
| 11 if (fctx->delaying && avpkt->size) { |
| 12 - if (fctx->next_decoding >= (thread_count-1)) fctx->delaying = 0; |
| 13 + if (decoding_save >= (thread_count-1)) fctx->delaying = 0; |
| 14 |
| 15 *got_picture_ptr=0; |
| 16 return 0; |
| 17 @@ -479,7 +481,6 @@ int ff_thread_decode_frame(AVCodecContex |
| 18 |
| 19 update_thread_context_from_copy(avctx, p->avctx, 1); |
| 20 |
| 21 - if (fctx->next_decoding >= thread_count) fctx->next_decoding = 0; |
| 22 fctx->next_finished = returning_thread; |
| 23 |
| 24 return p->result; |
OLD | NEW |