From 7cacf1e86a860ffd36b26dd0b1e2ac5d5cce0889 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Aug 2007 23:25:03 +0000 Subject: drop non keyframes before the first keyframe for stream copy Originally committed as revision 9881 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index 859f3ff398..66d21010de 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1210,6 +1210,9 @@ static int output_packet(AVInputStream *ist, int ist_index, AVPacket opkt; av_init_packet(&opkt); + if (!ost->frame_number && !(pkt->flags & PKT_FLAG_KEY)) + continue; + /* no reencoding needed : output the packet directly */ /* force the input stream PTS */ -- cgit v1.2.3