Commit e95580e7 authored by Baptiste Coudurier's avatar Baptiste Coudurier

this should be valid for audio too

Originally committed as revision 13517 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c2acba13
...@@ -1607,14 +1607,12 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -1607,14 +1607,12 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
trk->cluster[trk->entry].dts = pkt->dts; trk->cluster[trk->entry].dts = pkt->dts;
trk->trackDuration = pkt->dts - trk->cluster[0].dts + pkt->duration; trk->trackDuration = pkt->dts - trk->cluster[0].dts + pkt->duration;
if(enc->codec_type == CODEC_TYPE_VIDEO) {
if (pkt->dts != pkt->pts) if (pkt->dts != pkt->pts)
trk->hasBframes = 1; trk->hasBframes = 1;
trk->cluster[trk->entry].cts = pkt->pts - pkt->dts; trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
trk->cluster[trk->entry].key_frame = !!(pkt->flags & PKT_FLAG_KEY); trk->cluster[trk->entry].key_frame = !!(pkt->flags & PKT_FLAG_KEY);
if(trk->cluster[trk->entry].key_frame) if(trk->cluster[trk->entry].key_frame)
trk->hasKeyframes++; trk->hasKeyframes++;
}
trk->entry++; trk->entry++;
trk->sampleCount += samplesInChunk; trk->sampleCount += samplesInChunk;
mov->mdat_size += size; mov->mdat_size += size;
......
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