nutdec: fix mixup of nb_streams and timebase_count
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Sep 2012 04:29:24 +0000 (06:29 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Sep 2012 04:29:24 +0000 (06:29 +0200)
Fixes out of array read, should fix ffprove fate failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutdec.c

index becf7a4..31c7189 100644 (file)
@@ -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;