[FFmpeg-cvslog] lavf/xwma: Support wmapro.

Carl Eugen Hoyos git at videolan.org
Sun Oct 25 17:38:27 CET 2015


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Oct 25 17:37:17 2015 +0100| [6498b34bba8cf6bde4d7a9c9ea045ae1b8be106e] | committer: Carl Eugen Hoyos

lavf/xwma: Support wmapro.

Fixes ticket #4963.

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

 libavformat/xwma.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/libavformat/xwma.c b/libavformat/xwma.c
index 9edad7d..d516b76 100644
--- a/libavformat/xwma.c
+++ b/libavformat/xwma.c
@@ -85,7 +85,8 @@ static int xwma_read_header(AVFormatContext *s)
      * extradata for that. Thus, ask the user for feedback, but try to go on
      * anyway.
      */
-    if (st->codec->codec_id != AV_CODEC_ID_WMAV2) {
+    if (st->codec->codec_id != AV_CODEC_ID_WMAV2 &&
+        st->codec->codec_id != AV_CODEC_ID_WMAPRO) {
         avpriv_request_sample(s, "Unexpected codec (tag 0x04%x; id %d)",
                               st->codec->codec_tag, st->codec->codec_id);
     } else {
@@ -103,6 +104,13 @@ static int xwma_read_header(AVFormatContext *s)
              */
             avpriv_request_sample(s, "Unexpected extradata (%d bytes)",
                                   st->codec->extradata_size);
+        } else if (st->codec->codec_id == AV_CODEC_ID_WMAPRO) {
+            if (ff_alloc_extradata(st->codec, 18))
+                return AVERROR(ENOMEM);
+
+            memset(st->codec->extradata, 0, st->codec->extradata_size);
+            st->codec->extradata[ 0] = st->codec->bits_per_coded_sample;
+            st->codec->extradata[14] = 224;
         } else {
             if (ff_alloc_extradata(st->codec, 6))
                 return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list