summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>2012-04-16 23:27:45 +0900
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-04-21 14:04:33 -0400
commit94c9bf8887ed58de16c8ecffca2bd216751a40ed (patch)
treea556b8f30feca99e4704dc7acf2cd77fb9da410a /libavformat/mov.c
parentba9869311ff1794ff44b9360bb8f19b4e6d9c5d3 (diff)
mov: Treat keyframe indexes as 1-origin if starting at non-zero.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index a0c5393396..747f062833 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1754,7 +1754,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned int stts_sample = 0;
unsigned int sample_size;
unsigned int distance = 0;
- int key_off = (sc->keyframes && sc->keyframes[0] == 1) || (sc->stps_data && sc->stps_data[0] == 1);
+ int key_off = (sc->keyframes && sc->keyframes[0] > 0) || (sc->stps_data && sc->stps_data[0] > 0);
current_dts -= sc->dts_shift;