aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-04-11 08:12:54 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-04-11 08:12:54 +0000
commit32ba6fb141c787b52a1017d5e49e144d3313b619 (patch)
tree6612624de54a2308be35eb6f02629f52488c930d /libavformat/movenc.c
parentfd7789dbe8a01e1d96cd98a332cb5e3e84c5745e (diff)
downloadffmpeg-32ba6fb141c787b52a1017d5e49e144d3313b619.tar.gz
dont write stss atom if keyframes only
Originally committed as revision 5284 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b7d67959fa..f1529596f8 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -758,7 +758,7 @@ static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack* track)
mov_write_stsd_tag(pb, track);
mov_write_stts_tag(pb, track);
if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
- track->hasKeyframes)
+ track->hasKeyframes < track->entry)
mov_write_stss_tag(pb, track);
if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
track->hasBframes)
@@ -1717,7 +1717,7 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
trk->cluster[cl][id].cts = pkt->pts - pkt->dts;
trk->cluster[cl][id].key_frame = !!(pkt->flags & PKT_FLAG_KEY);
if(trk->cluster[cl][id].key_frame)
- trk->hasKeyframes = 1;
+ trk->hasKeyframes++;
}
trk->enc = enc;
trk->entry++;