From eabff64640a75f9a32de50677bc26952d0cbcc9b Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 20 Nov 2008 21:20:27 +0000 Subject: [PATCH] gst-libs/gst/riff/riff-media.c: Support WMA Lossless properly. Original commit message from CVS: * gst-libs/gst/riff/riff-media.c: Support WMA Lossless properly. --- ChangeLog | 5 +++++ gst-libs/gst/riff/riff-media.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0be454..3e7f1e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-20 Michael Smith + + * gst-libs/gst/riff/riff-media.c: + Support WMA Lossless properly. + 2008-11-18 David Schleef * gst/videotestsrc/gstvideotestsrc.c: diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index 21e885c..64257bf 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -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) -- 2.7.4