[FFmpeg-cvslog] avcodec/h264_parser: fix for possible overflow
Paul B Mahol
git at videolan.org
Wed Sep 14 22:15:32 EEST 2016
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Sep 14 21:14:07 2016 +0200| [92dbd65700334ac9c77bf085fca7b72dd7445ffd] | committer: Paul B Mahol
avcodec/h264_parser: fix for possible overflow
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92dbd65700334ac9c77bf085fca7b72dd7445ffd
---
libavcodec/h264_parser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 4dacb22..3ed7d77 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -600,9 +600,9 @@ static int h264_parse(AVCodecParserContext *s,
}
if (s->dts_sync_point >= 0) {
- int64_t den = avctx->time_base.den * avctx->pkt_timebase.num;
+ int64_t den = avctx->time_base.den * (int64_t)avctx->pkt_timebase.num;
if (den > 0) {
- int64_t num = avctx->time_base.num * avctx->pkt_timebase.den;
+ int64_t num = avctx->time_base.num * (int64_t)avctx->pkt_timebase.den;
if (s->dts != AV_NOPTS_VALUE) {
// got DTS from the stream, update reference timestamp
p->reference_dts = s->dts - av_rescale(s->dts_ref_dts_delta, num, den);
More information about the ffmpeg-cvslog
mailing list