[FFmpeg-cvslog] nutdec: fix mixup of nb_streams and timebase_count

Michael Niedermayer git at videolan.org
Fri Sep 21 06:34:20 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Sep 21 06:29:24 2012 +0200| [fb96ac469a1d375b473868984f832e3a7cdfc24c] | committer: Michael Niedermayer

nutdec: fix mixup of nb_streams and timebase_count

Fixes out of array read, should fix ffprove fate failure

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/nutdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index becf7a4..31c7189 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -548,8 +548,8 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr)
         return -1;
     }
 
-    *ts = tmp / s->nb_streams *
-          av_q2d(nut->time_base[tmp % s->nb_streams]) * AV_TIME_BASE;
+    *ts = tmp / nut->time_base_count *
+          av_q2d(nut->time_base[tmp % nut->time_base_count]) * AV_TIME_BASE;
     ff_nut_add_sp(nut, nut->last_syncpoint_pos, *back_ptr, *ts);
 
     return 0;



More information about the ffmpeg-cvslog mailing list