[libav-commits] mov: Treat keyframe indexes as 1-origin if starting at non-zero.

Yusuke Nakamura git at libav.org
Sat Apr 21 20:11:08 CEST 2012


Module: libav
Branch: master
Commit: 94c9bf8887ed58de16c8ecffca2bd216751a40ed

Author:    Yusuke Nakamura <muken.the.vfrmaniac at gmail.com>
Committer: Derek Buitenhuis <derek.buitenhuis at gmail.com>
Date:      Mon Apr 16 23:27:45 2012 +0900

mov: Treat keyframe indexes as 1-origin if starting at non-zero.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

---

 libavformat/mov.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index a0c5393..747f062 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;
 



More information about the libav-commits mailing list