[FFmpeg-cvslog] mov: Take stps entries into consideration also about key_off.

Yusuke Nakamura git at videolan.org
Sun Apr 22 22:41:56 CEST 2012


ffmpeg | branch: master | Yusuke Nakamura <muken.the.vfrmaniac at gmail.com> | Fri Apr 13 19:44:34 2012 +0900| [ba9869311ff1794ff44b9360bb8f19b4e6d9c5d3] | committer: Derek Buitenhuis

mov: Take stps entries into consideration also about key_off.

Splitted files don't start always from a sync sample.

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba9869311ff1794ff44b9360bb8f19b4e6d9c5d3
---

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 11b4582..a0c5393 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;
+        int key_off = (sc->keyframes && sc->keyframes[0] == 1) || (sc->stps_data && sc->stps_data[0] == 1);
 
         current_dts -= sc->dts_shift;
 



More information about the ffmpeg-cvslog mailing list