OSDN Git Service

drop non keyframes before the first keyframe for stream copy
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Aug 2007 23:25:03 +0000 (23:25 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Aug 2007 23:25:03 +0000 (23:25 +0000)
Originally committed as revision 9881 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 859f3ff..66d2101 100644 (file)
--- 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 */