1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avienc: Add a limit on the number of skiped frames muxed in a row.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-10-01 03:48:33 +02:00
parent 8447703c16
commit 9cb9e39c41

View File

@ -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){ while(enc->block_align==0 && pkt->dts != AV_NOPTS_VALUE && pkt->dts > avist->packet_count){
AVPacket empty_packet; 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); av_init_packet(&empty_packet);
empty_packet.size= 0; empty_packet.size= 0;
empty_packet.data= NULL; empty_packet.data= NULL;