diff options
author | Martin Storsjö <martin@martin.st> | 2012-01-23 14:58:38 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-02-13 19:57:28 +0200 |
commit | 5d561514b7bb435ce810c72d8502ed0186e51979 (patch) | |
tree | 0365e3ec1386837aae73923b5149efcd86b13245 /libavformat | |
parent | ddf422803b667215d8ac41da7bb091d861db0c9b (diff) | |
download | ffmpeg-5d561514b7bb435ce810c72d8502ed0186e51979.tar.gz |
movenc: Support muxing wmapro in ismv/isma
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index ee0d96e534..1c68a93f57 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -350,6 +350,15 @@ static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track) return update_size(pb, pos); } +static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track) +{ + int64_t pos = avio_tell(pb); + avio_wb32(pb, 0); + ffio_wfourcc(pb, "wfex"); + ff_put_wav_header(pb, track->enc); + return update_size(pb, pos); +} + static int mov_write_chan_tag(AVIOContext *pb, MOVTrack *track) { uint32_t layout_tag, bitmap; @@ -514,6 +523,8 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) mov_write_ac3_tag(pb, track); else if(track->enc->codec_id == CODEC_ID_ALAC) mov_write_extradata_tag(pb, track); + else if (track->enc->codec_id == CODEC_ID_WMAPRO) + mov_write_wfex_tag(pb, track); else if (track->vos_len > 0) mov_write_glbl_tag(pb, track); @@ -763,9 +774,13 @@ static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->enc->codec_tag; - if (track->mode == MODE_MP4 || track->mode == MODE_PSP || track->mode == MODE_ISM) + if (track->mode == MODE_MP4 || track->mode == MODE_PSP) + tag = mp4_get_codec_tag(s, track); + else if (track->mode == MODE_ISM) { tag = mp4_get_codec_tag(s, track); - else if (track->mode == MODE_IPOD) + if (!tag && track->enc->codec_id == CODEC_ID_WMAPRO) + tag = MKTAG('w', 'm', 'a', ' '); + } else if (track->mode == MODE_IPOD) tag = ipod_get_codec_tag(s, track); else if (track->mode & MODE_3GP) tag = ff_codec_get_tag(codec_3gp_tags, track->enc->codec_id); |