You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
movenc: Include empty tracks in iods when writing fragmented mp4
When writing fragmented streams with an empty initial moov, we won't have any samples in any tracks when writing the moov atom, thus trust that any tracks that are added actually will be present. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -1809,7 +1809,7 @@ static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov)
|
|||||||
int audio_profile = mov->iods_audio_profile;
|
int audio_profile = mov->iods_audio_profile;
|
||||||
int video_profile = mov->iods_video_profile;
|
int video_profile = mov->iods_video_profile;
|
||||||
for (i = 0; i < mov->nb_streams; i++) {
|
for (i = 0; i < mov->nb_streams; i++) {
|
||||||
if (mov->tracks[i].entry > 0) {
|
if (mov->tracks[i].entry > 0 || mov->flags & FF_MOV_FLAG_EMPTY_MOOV) {
|
||||||
has_audio |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_AUDIO;
|
has_audio |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_AUDIO;
|
||||||
has_video |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_VIDEO;
|
has_video |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_VIDEO;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user