aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-03 12:29:41 +0100
committerAlex Converse <alex.converse@gmail.com>2012-03-06 15:25:34 -0800
commita294a7a1b3c1c797d5ea206359df35acfb977834 (patch)
tree0ee9360ade5450fc6e2763b6cd88ffd7c1e1ef2b /libavformat/mov.c
parentb5161908e06b4497bf663510fb495ba97a6fd2b5 (diff)
downloadffmpeg-a294a7a1b3c1c797d5ea206359df35acfb977834.tar.gz
mov: Allow last chunk to have an arbitrary number of samples.
Fixes ticket #673. (cherry picked from commit 8dcd2a41ecff8cc1e9b20cc267df54c59878ab3b) Signed-off-by: Alex Converse <alex.converse@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 701a1c187a..7b21423afa 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1821,7 +1821,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned count, chunk_count;
chunk_samples = sc->stsc_data[i].count;
- if (sc->samples_per_frame && chunk_samples % sc->samples_per_frame) {
+ if (i != sc->stsc_count - 1 &&
+ sc->samples_per_frame && chunk_samples % sc->samples_per_frame) {
av_log(mov->fc, AV_LOG_ERROR, "error unaligned chunk\n");
return;
}