avformat/asfenc: Flush packet before duration becomes unrepresentable

Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-01-12 18:26:34 +01:00
parent 782c4ab4ed
commit d73f0c586e

View File

@ -862,6 +862,11 @@ static void put_frame(AVFormatContext *s, ASFStream *stream, AVStream *avst,
flush_packet(s);
continue;
}
if (asf->packet_timestamp_start > INT64_MAX - UINT16_MAX ||
timestamp > asf->packet_timestamp_start + UINT16_MAX) {
flush_packet(s);
continue;
}
}
if (frag_len1 > 0) {
if (payload_len > frag_len1)