diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-01 03:48:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-01 21:04:04 +0200 |
commit | 80331265cafe2e331fb47350e00b661eccbe6970 (patch) | |
tree | 06bfc4dba17a98293e0066f2930f2350fce2ed04 | |
parent | 00f6cbb53df64a3a730d9c841dddb534ba562d53 (diff) | |
download | ffmpeg-80331265cafe2e331fb47350e00b661eccbe6970.tar.gz |
avienc: Add a limit on the number of skiped frames muxed in a row.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9cb9e39c41959961bdb5a1fd51cdd25e10c050f3)
-rw-r--r-- | libavformat/avienc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c index deff1c8d20..1c8eedad09 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -523,6 +523,11 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) while(enc->block_align==0 && pkt->dts != AV_NOPTS_VALUE && pkt->dts > avist->packet_count){ AVPacket empty_packet; + if(pkt->dts - avist->packet_count > 60000){ + av_log(s, AV_LOG_ERROR, "Too large number of skiped frames %Ld\n", pkt->dts - avist->packet_count); + return AVERROR(EINVAL); + } + av_init_packet(&empty_packet); empty_packet.size= 0; empty_packet.data= NULL; |