aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-08-03 23:25:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-08-03 23:25:03 +0000
commit7cacf1e86a860ffd36b26dd0b1e2ac5d5cce0889 (patch)
tree3a77e4d8a0eb9450e14de9eb269f823bc239010f
parent4efd6f58b64c4b4187ac7ee65162b94106272295 (diff)
downloadffmpeg-7cacf1e86a860ffd36b26dd0b1e2ac5d5cce0889.tar.gz
drop non keyframes before the first keyframe for stream copy
Originally committed as revision 9881 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c3
1 files changed, 3 insertions, 0 deletions
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 */