Browse Source

movtextdec: Move declaration out of for initialisation statement

tags/n4.0
Mark Thompson 7 years ago
parent
commit
e7d20d5e35
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/movtextdec.c

+ 2
- 1
libavcodec/movtextdec.c View File

@@ -436,6 +436,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
int text_length, tsmb_type, ret_tsmb; int text_length, tsmb_type, ret_tsmb;
uint64_t tsmb_size; uint64_t tsmb_size;
const uint8_t *tsmb; const uint8_t *tsmb;
size_t i;


if (!ptr || avpkt->size < 2) if (!ptr || avpkt->size < 2)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
@@ -495,7 +496,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
if (tsmb_size > avpkt->size - m->tracksize) if (tsmb_size > avpkt->size - m->tracksize)
break; 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 (tsmb_type == box_types[i].type) {
if (m->tracksize + m->size_var + box_types[i].base_size > avpkt->size) if (m->tracksize + m->size_var + box_types[i].base_size > avpkt->size)
break; break;


Loading…
Cancel
Save