# HG changeset patch # User bcoudurier # Date 1144743174 0 # Node ID b38a08b0cd12ca3215ad1d07a89bd0efb09c1e10 # Parent df4150ae4ebf33385db065cbc1ff0d740542e008 dont write stss atom if keyframes only diff -r df4150ae4ebf -r b38a08b0cd12 movenc.c --- a/movenc.c Mon Apr 10 17:04:22 2006 +0000 +++ b/movenc.c Tue Apr 11 08:12:54 2006 +0000 @@ -758,7 +758,7 @@ 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 @@ 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++;