[FFmpeg-cvslog] avformat/wavdec: Dont rescale timestamps but use exact comparission
Michael Niedermayer
git at videolan.org
Sat Jun 8 20:07:15 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 8 19:22:34 2013 +0200| [2a91038e13a00897fde89ad65a36012985687793] | committer: Michael Niedermayer
avformat/wavdec: Dont rescale timestamps but use exact comparission
Fixes integer overflow
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a91038e13a00897fde89ad65a36012985687793
---
libavformat/wavdec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index a94c0a9..adf41ec 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -462,10 +462,10 @@ smv_retry:
video_dts = s->streams[1]->cur_dts;
if (audio_dts != AV_NOPTS_VALUE && video_dts != AV_NOPTS_VALUE) {
- audio_dts = av_rescale_q(audio_dts, s->streams[0]->time_base, AV_TIME_BASE_Q);
- video_dts = av_rescale_q(video_dts, s->streams[1]->time_base, AV_TIME_BASE_Q);
/*We always return a video frame first to get the pixel format first*/
- wav->smv_last_stream = wav->smv_given_first ? video_dts > audio_dts : 0;
+ wav->smv_last_stream = wav->smv_given_first ?
+ av_compare_ts(video_dts, s->streams[1]->time_base,
+ audio_dts, s->streams[0]->time_base) > 0 : 0;
wav->smv_given_first = 1;
}
wav->smv_last_stream = !wav->smv_last_stream;
More information about the ffmpeg-cvslog
mailing list