aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-05-23 11:32:52 -0700
committerAlex Converse <alex.converse@gmail.com>2012-05-25 11:24:43 -0700
commited7bdd8647a3d0f534c2af0d244fc8744ff262a0 (patch)
tree003ca58d16a73468a79c1831a0d7f030237e4818
parentd073f122ea57ceb2ff20b24abefbc0e353d70795 (diff)
downloadffmpeg-ed7bdd8647a3d0f534c2af0d244fc8744ff262a0.tar.gz
movenc: Don't write the 'wave' atom or its child 'enda' for lpcm audio.
It's left over from stsd v0. QuickTime 7 no longer writes 'wave' or 'enda' when 'lpcm' is the audio tag.
-rw-r--r--libavformat/movenc.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 35c03ddfef..fa6e95771e 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -264,14 +264,6 @@ static int mov_write_extradata_tag(AVIOContext *pb, MOVTrack *track)
return track->enc->extradata_size;
}
-static int mov_write_enda_tag(AVIOContext *pb)
-{
- avio_wb32(pb, 10);
- ffio_wfourcc(pb, "enda");
- avio_wb16(pb, 1); /* little endian */
- return 10;
-}
-
static void put_descr(AVIOContext *pb, int tag, unsigned int size)
{
int i = 3;
@@ -334,14 +326,6 @@ static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track) // Basic
return update_size(pb, pos);
}
-static int mov_pcm_le_gt16(enum CodecID codec_id)
-{
- return codec_id == CODEC_ID_PCM_S24LE ||
- codec_id == CODEC_ID_PCM_S32LE ||
- codec_id == CODEC_ID_PCM_F32LE ||
- codec_id == CODEC_ID_PCM_F64LE;
-}
-
static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
@@ -403,8 +387,6 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track)
ffio_wfourcc(pb, "mp4a");
avio_wb32(pb, 0);
mov_write_esds_tag(pb, track);
- } else if (mov_pcm_le_gt16(track->enc->codec_id)) {
- mov_write_enda_tag(pb);
} else if (track->enc->codec_id == CODEC_ID_AMR_NB) {
mov_write_amr_tag(pb, track);
} else if (track->enc->codec_id == CODEC_ID_AC3) {
@@ -641,8 +623,7 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track)
track->enc->codec_id == CODEC_ID_AMR_NB ||
track->enc->codec_id == CODEC_ID_ALAC ||
track->enc->codec_id == CODEC_ID_ADPCM_MS ||
- track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV ||
- mov_pcm_le_gt16(track->enc->codec_id)))
+ track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV))
mov_write_wave_tag(pb, track);
else if(track->tag == MKTAG('m','p','4','a'))
mov_write_esds_tag(pb, track);