avformat/avidec: Do not fail for crazy start times
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
27dfe54eb7
commit
28fc31d78d
@ -659,7 +659,7 @@ static int avi_read_header(AVFormatContext *s)
|
|||||||
avio_rl32(pb); /* quality */
|
avio_rl32(pb); /* quality */
|
||||||
if (ast->cum_len*ast->scale/ast->rate > 3600) {
|
if (ast->cum_len*ast->scale/ast->rate > 3600) {
|
||||||
av_log(s, AV_LOG_ERROR, "crazy start time, iam scared, giving up\n");
|
av_log(s, AV_LOG_ERROR, "crazy start time, iam scared, giving up\n");
|
||||||
return AVERROR_INVALIDDATA;
|
ast->cum_len = 0;
|
||||||
}
|
}
|
||||||
ast->sample_size = avio_rl32(pb); /* sample ssize */
|
ast->sample_size = avio_rl32(pb); /* sample ssize */
|
||||||
ast->cum_len *= FFMAX(1, ast->sample_size);
|
ast->cum_len *= FFMAX(1, ast->sample_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user