aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-03 12:29:41 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-03 12:29:41 +0100
commit8dcd2a41ecff8cc1e9b20cc267df54c59878ab3b (patch)
treed22874d51d1531360096b67d9a6814a3f5b744cd
parent88bbabcc006edf7fb4c8ba339d4a64a8b5b8c3d8 (diff)
downloadffmpeg-8dcd2a41ecff8cc1e9b20cc267df54c59878ab3b.tar.gz
Allow last mov chunk to have an arbitrary number of samples.
Fixes ticket #673.
-rw-r--r--libavformat/mov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index e527f2489d..db667e9429 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1741,7 +1741,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;
}