We generally do not declare variables within for statements and there are compilers that choke on such constructs.
Showing the changes to libavcodec (1 of 3 files). Show all
Unified · Split
| @@ -865,6 +865,7 @@ error: · 864 unmodified lines | |||
| 865 | 865 | ||
| 866 | void ff_thread_flush(AVCodecContext *avctx) | 866 | void ff_thread_flush(AVCodecContext *avctx) |
| 867 | { | 867 | { |
| 868 | int i; | ||
| 868 | FrameThreadContext *fctx = avctx->thread_opaque; | 869 | FrameThreadContext *fctx = avctx->thread_opaque; |
| 869 | 870 | ||
| 870 | if (!avctx->thread_opaque) return; | 871 | if (!avctx->thread_opaque) return; |
| @@ -880,7 +881,7 @@ void ff_thread_flush(AVCodecContext *avctx) · 9 unmodified lines | |||
| 880 | fctx->next_decoding = fctx->next_finished = 0; | 881 | fctx->next_decoding = fctx->next_finished = 0; |
| 881 | fctx->delaying = 1; | 882 | fctx->delaying = 1; |
| 882 | fctx->prev_thread = NULL; | 883 | fctx->prev_thread = NULL; |
| 883 | for (int i = 0; i < avctx->thread_count; i++) { | 884 | for (i = 0; i < avctx->thread_count; i++) { |
| 884 | PerThreadContext *p = &fctx->threads[i]; | 885 | PerThreadContext *p = &fctx->threads[i]; |
| 885 | // Make sure decode flush calls with size=0 won't return old frames | 886 | // Make sure decode flush calls with size=0 won't return old frames |
| 886 | p->got_frame = 0; | 887 | p->got_frame = 0; |