changeset 1054:b38a08b0cd12 libavformat

dont write stss atom if keyframes only
author bcoudurier
date Tue, 11 Apr 2006 08:12:54 +0000
parents df4150ae4ebf
children faa09c43a3d6
files movenc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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++;