Commit 1edd9031 authored by bcoudurier's avatar bcoudurier

dont write stss atom if keyframes only


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5284 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 52353cf5
...@@ -758,7 +758,7 @@ static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack* track) ...@@ -758,7 +758,7 @@ static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack* track)
mov_write_stsd_tag(pb, track); mov_write_stsd_tag(pb, track);
mov_write_stts_tag(pb, track); mov_write_stts_tag(pb, track);
if (track->enc->codec_type == CODEC_TYPE_VIDEO && if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
track->hasKeyframes) track->hasKeyframes < track->entry)
mov_write_stss_tag(pb, track); mov_write_stss_tag(pb, track);
if (track->enc->codec_type == CODEC_TYPE_VIDEO && if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
track->hasBframes) track->hasBframes)
...@@ -1717,7 +1717,7 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -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].cts = pkt->pts - pkt->dts;
trk->cluster[cl][id].key_frame = !!(pkt->flags & PKT_FLAG_KEY); trk->cluster[cl][id].key_frame = !!(pkt->flags & PKT_FLAG_KEY);
if(trk->cluster[cl][id].key_frame) if(trk->cluster[cl][id].key_frame)
trk->hasKeyframes = 1; trk->hasKeyframes++;
} }
trk->enc = enc; trk->enc = enc;
trk->entry++; trk->entry++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment