[FFmpeg-cvslog] movenc: Support muxing wmapro in ismv/isma

Martin Storsjö git at videolan.org
Tue Feb 14 02:18:51 CET 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Jan 23 14:58:38 2012 +0200| [5d561514b7bb435ce810c72d8502ed0186e51979] | committer: Martin Storsjö

movenc: Support muxing wmapro in ismv/isma

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d561514b7bb435ce810c72d8502ed0186e51979
---

 libavformat/movenc.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index ee0d96e..1c68a93 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);



More information about the ffmpeg-cvslog mailing list