[FFmpeg-cvslog] mov: check stps correctly, avoid overreading 1 element.

Michael Niedermayer git at videolan.org
Tue Nov 13 21:57:32 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 13 19:41:55 2012 +0100| [4392e69ad4e45c3de4d9e28466530698ca704c51] | committer: Michael Niedermayer

mov: check stps correctly, avoid overreading 1 element.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 11b1c8d..f33a5ac 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1961,7 +1961,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
         unsigned int rap_group_index = 0;
         unsigned int rap_group_sample = 0;
         int rap_group_present = sc->rap_group_count && sc->rap_group;
-        int key_off = (sc->keyframe_count && sc->keyframes[0] > 0) || (sc->stps_data && sc->stps_data[0] > 0);
+        int key_off = (sc->keyframe_count && sc->keyframes[0] > 0) || (sc->stps_count && sc->stps_data[0] > 0);
 
         current_dts -= sc->dts_shift;
 



More information about the ffmpeg-cvslog mailing list