lavf: fix signed overflow in avformat_find_stream_info()
authorMans Rullgard <mans@mansr.com>
Sat, 8 Oct 2011 01:06:26 +0000 (02:06 +0100)
committerMans Rullgard <mans@mansr.com>
Sat, 8 Oct 2011 19:04:22 +0000 (20:04 +0100)
commita31e9f68a426f634e002282885c6c2eb1bfbea44
treed1843f16a1bd26fc81c48c612b7a08403984cdb4
parentbb59156606e00057a706ed30165bc7329db3823f
lavf: fix signed overflow in avformat_find_stream_info()

On the first iteration through this code, last_dts is always
INT64_MIN (AV_NOPTS_VALUE) and the subtraction overflows in
an invalid manner.  Although the result is only used if the
input values are valid, performing the subtraction is still
not allowed in a strict environment.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavformat/utils.c