diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-08-06 00:37:28 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-08-06 00:37:28 +0200 |
commit | 68f4156f448a3babfb7eabfb024411b4b659f09b (patch) | |
tree | d1fdf60488195b9c263502647f86ba85462f5ae6 /libavformat | |
parent | 1b72a7e8a9c0e8598e83706b4698d0d4319d8345 (diff) | |
download | ffmpeg-68f4156f448a3babfb7eabfb024411b4b659f09b.tar.gz |
movenv: fix remuxing of qdm2
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index cd8d8f1c3b..659436b5ab 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -407,9 +407,11 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track) avio_wb32(pb, 0); /* size */ ffio_wfourcc(pb, "wave"); + if (track->enc->codec_id != CODEC_ID_QDM2) { avio_wb32(pb, 12); /* size */ ffio_wfourcc(pb, "frma"); avio_wl32(pb, track->tag); + } if (track->enc->codec_id == CODEC_ID_AAC) { /* useless atom needed by mplayer, ipod, not needed by quicktime */ @@ -423,7 +425,8 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track) mov_write_amr_tag(pb, track); } else if (track->enc->codec_id == CODEC_ID_AC3) { mov_write_ac3_tag(pb, track); - } else if (track->enc->codec_id == CODEC_ID_ALAC) { + } else if (track->enc->codec_id == CODEC_ID_ALAC || + track->enc->codec_id == CODEC_ID_QDM2) { mov_write_extradata_tag(pb, track); } else if (track->enc->codec_id == CODEC_ID_ADPCM_MS || track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) { @@ -614,7 +617,8 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) version = 2; } else if (track->audio_vbr || mov_pcm_le_gt16(track->enc->codec_id) || track->enc->codec_id == CODEC_ID_ADPCM_MS || - track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) { + track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV || + track->enc->codec_id == CODEC_ID_QDM2) { version = 1; } } @@ -679,6 +683,7 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) track->enc->codec_id == CODEC_ID_ALAC || track->enc->codec_id == CODEC_ID_ADPCM_MS || track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV || + track->enc->codec_id == CODEC_ID_QDM2 || (mov_pcm_le_gt16(track->enc->codec_id) && version==1))) mov_write_wave_tag(pb, track); else if(track->tag == MKTAG('m','p','4','a')) |