Commit d9a91d58 authored by Paul B Mahol's avatar Paul B Mahol

avformat/movenc: treat ALAC same as FLAC and write correct info

Fixes #7291.
parent 5e6b93bb
...@@ -1079,12 +1079,14 @@ static int mov_write_audio_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex ...@@ -1079,12 +1079,14 @@ static int mov_write_audio_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
avio_wb16(pb, track->audio_vbr ? -2 : 0); /* compression ID */ avio_wb16(pb, track->audio_vbr ? -2 : 0); /* compression ID */
} else { /* reserved for mp4/3gp */ } else { /* reserved for mp4/3gp */
if (track->par->codec_id == AV_CODEC_ID_FLAC || if (track->par->codec_id == AV_CODEC_ID_FLAC ||
track->par->codec_id == AV_CODEC_ID_ALAC ||
track->par->codec_id == AV_CODEC_ID_OPUS) { track->par->codec_id == AV_CODEC_ID_OPUS) {
avio_wb16(pb, track->par->channels); avio_wb16(pb, track->par->channels);
} else { } else {
avio_wb16(pb, 2); avio_wb16(pb, 2);
} }
if (track->par->codec_id == AV_CODEC_ID_FLAC) { if (track->par->codec_id == AV_CODEC_ID_FLAC ||
track->par->codec_id == AV_CODEC_ID_ALAC) {
avio_wb16(pb, track->par->bits_per_raw_sample); avio_wb16(pb, track->par->bits_per_raw_sample);
} else { } else {
avio_wb16(pb, 16); avio_wb16(pb, 16);
......
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