aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-10-17 21:28:25 +0100
committerMark Thompson <sw@jkqxz.net>2017-10-21 22:19:50 +0100
commite7d20d5e3500a24d9713572cfb641d415e6beffa (patch)
tree03d347cd83063b164deff7068f8547ec3ffd3e65 /libavcodec
parente0a967a405463ac581b5861b8bf45fa67c4a3a2f (diff)
downloadffmpeg-e7d20d5e3500a24d9713572cfb641d415e6beffa.tar.gz
movtextdec: Move declaration out of for initialisation statement
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/movtextdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index fb5085c3e8..bd19577724 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -436,6 +436,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
int text_length, tsmb_type, ret_tsmb;
uint64_t tsmb_size;
const uint8_t *tsmb;
+ size_t i;
if (!ptr || avpkt->size < 2)
return AVERROR_INVALIDDATA;
@@ -495,7 +496,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
if (tsmb_size > avpkt->size - m->tracksize)
break;
- for (size_t i = 0; i < box_count; i++) {
+ for (i = 0; i < box_count; i++) {
if (tsmb_type == box_types[i].type) {
if (m->tracksize + m->size_var + box_types[i].base_size > avpkt->size)
break;