aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2011-12-10 14:42:46 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-12-21 10:44:57 -0500
commit17c84f4ed2dcc617b45a0e305725bfca7bc0bfd1 (patch)
tree073204fca0cd8220a452e44e681ea15b21985b9b /libavformat
parentc15da5941d55eadf7cc4a4e0207ef1b8a4bf9c00 (diff)
downloadffmpeg-17c84f4ed2dcc617b45a0e305725bfca7bc0bfd1.tar.gz
flacdec: skip all track indices at once instead of looping.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/flacdec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index f3831c19ba..9e083d116c 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -102,7 +102,7 @@ static int flac_read_header(AVFormatContext *s,
uint8_t isrc[13];
uint64_t start;
const uint8_t *offset;
- int i, j, chapters, track, ti;
+ int i, chapters, track, ti;
if (metadata_size < 431)
return AVERROR_INVALIDDATA;
offset = buffer + 395;
@@ -119,8 +119,7 @@ static int flac_read_header(AVFormatContext *s,
offset += 14;
ti = bytestream_get_byte(&offset);
if (ti <= 0) return AVERROR_INVALIDDATA;
- for (j = 0; j < ti; j++)
- offset += 12;
+ offset += ti * 12;
avpriv_new_chapter(s, track, st->time_base, start, AV_NOPTS_VALUE, isrc);
}
} else {