aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-21 06:29:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-21 06:29:24 +0200
commitfb96ac469a1d375b473868984f832e3a7cdfc24c (patch)
treebca39f35dd4bb0a059d81f9af2b4351b5e8c9c25 /libavformat/nutdec.c
parent6ab1166c770fb279ba4ac8dba13d53c4842efd4f (diff)
downloadffmpeg-fb96ac469a1d375b473868984f832e3a7cdfc24c.tar.gz
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@gmx.at>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r--libavformat/nutdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index becf7a44d7..31c7189020 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;