gst-libs/gst/riff/riff-media.c: Support WMA Lossless properly.
authorMichael Smith <msmith@xiph.org>
Thu, 20 Nov 2008 21:20:27 +0000 (21:20 +0000)
committerMichael Smith <msmith@xiph.org>
Thu, 20 Nov 2008 21:20:27 +0000 (21:20 +0000)
Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c:
Support WMA Lossless properly.

ChangeLog
gst-libs/gst/riff/riff-media.c

index b0be454..3e7f1e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-20  Michael Smith <msmith@songbirdnest.com>
+
+       * gst-libs/gst/riff/riff-media.c:
+         Support WMA Lossless properly.
+
 2008-11-18  David Schleef  <ds@schleef.org>
 
        * gst/videotestsrc/gstvideotestsrc.c:
index 21e885c..64257bf 100644 (file)
@@ -1136,6 +1136,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
     case GST_RIFF_WAVE_FORMAT_WMAV1:
     case GST_RIFF_WAVE_FORMAT_WMAV2:
     case GST_RIFF_WAVE_FORMAT_WMAV3:
+    case GST_RIFF_WAVE_FORMAT_WMAV3_L:
     {
       gint version = (codec_id - GST_RIFF_WAVE_FORMAT_WMAV1) + 1;
 
@@ -1145,8 +1146,12 @@ gst_riff_create_audio_caps (guint16 codec_id,
       caps = gst_caps_new_simple ("audio/x-wma",
           "wmaversion", G_TYPE_INT, version, NULL);
 
-      if (codec_name)
-        *codec_name = g_strdup_printf ("WMA Version %d", version + 6);
+      if (codec_name) {
+        if (codec_id == GST_RIFF_WAVE_FORMAT_WMAV3_L)
+          *codec_name = g_strdup ("WMA Lossless");
+        else
+          *codec_name = g_strdup_printf ("WMA Version %d", version + 6);
+      }
 
       if (strf != NULL) {
         gst_caps_set_simple (caps,
@@ -1158,11 +1163,6 @@ gst_riff_create_audio_caps (guint16 codec_id,
       }
       break;
     }
-    case GST_RIFF_WAVE_FORMAT_WMAV3_L:
-    {
-      /* WMA Version 9 Lossless */
-      goto unknown;
-    }
     case GST_RIFF_WAVE_FORMAT_SONY_ATRAC3:
       caps = gst_caps_new_simple ("audio/x-vnd.sony.atrac3", NULL);
       if (codec_name)