mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
mssdemux: fix wma pro caps creation
WmaPro is actually wmaversion 3, and can also be found by the WMAP fourcc. Some manifests also contain the block_align field as "PacketSize" in the audio track description, the libav decoders require it to be present in caps. Fixes #699921
This commit is contained in:
parent
504142ea93
commit
750137c4be
1 changed files with 6 additions and 2 deletions
|
@ -327,8 +327,8 @@ _gst_mss_stream_audio_caps_from_fourcc (gchar * fourcc)
|
||||||
if (strcmp (fourcc, "AACL") == 0) {
|
if (strcmp (fourcc, "AACL") == 0) {
|
||||||
return gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 4,
|
return gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 4,
|
||||||
NULL);
|
NULL);
|
||||||
} else if (strcmp (fourcc, "WmaPro") == 0) {
|
} else if (strcmp (fourcc, "WmaPro") == 0 || strcmp (fourcc, "WMAP") == 0) {
|
||||||
return gst_caps_new_simple ("audio/x-wma", "wmaversion", G_TYPE_INT, 2,
|
return gst_caps_new_simple ("audio/x-wma", "wmaversion", G_TYPE_INT, 3,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -565,6 +565,7 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (GstMssStreamQuality * q)
|
||||||
gchar *fourcc = (gchar *) xmlGetProp (node, (xmlChar *) "FourCC");
|
gchar *fourcc = (gchar *) xmlGetProp (node, (xmlChar *) "FourCC");
|
||||||
gchar *channels_str = (gchar *) xmlGetProp (node, (xmlChar *) "Channels");
|
gchar *channels_str = (gchar *) xmlGetProp (node, (xmlChar *) "Channels");
|
||||||
gchar *rate_str = (gchar *) xmlGetProp (node, (xmlChar *) "SamplingRate");
|
gchar *rate_str = (gchar *) xmlGetProp (node, (xmlChar *) "SamplingRate");
|
||||||
|
gchar *block_align_str = (gchar *) xmlGetProp(node, (xmlChar *) "PacketSize");
|
||||||
gchar *codec_data_str =
|
gchar *codec_data_str =
|
||||||
(gchar *) xmlGetProp (node, (xmlChar *) "CodecPrivateData");
|
(gchar *) xmlGetProp (node, (xmlChar *) "CodecPrivateData");
|
||||||
GstBuffer *codec_data = NULL;
|
GstBuffer *codec_data = NULL;
|
||||||
|
@ -588,6 +589,8 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (GstMssStreamQuality * q)
|
||||||
rate = (gint) g_ascii_strtoull (rate_str, NULL, 10);
|
rate = (gint) g_ascii_strtoull (rate_str, NULL, 10);
|
||||||
if (channels_str)
|
if (channels_str)
|
||||||
channels = (int) g_ascii_strtoull (channels_str, NULL, 10);
|
channels = (int) g_ascii_strtoull (channels_str, NULL, 10);
|
||||||
|
if (block_align_str)
|
||||||
|
block_align = (int) g_ascii_strtoull (block_align_str, NULL, 10);
|
||||||
|
|
||||||
if (!codec_data) {
|
if (!codec_data) {
|
||||||
GstMapInfo mapinfo;
|
GstMapInfo mapinfo;
|
||||||
|
@ -636,6 +639,7 @@ end:
|
||||||
xmlFree (fourcc);
|
xmlFree (fourcc);
|
||||||
xmlFree (channels_str);
|
xmlFree (channels_str);
|
||||||
xmlFree (rate_str);
|
xmlFree (rate_str);
|
||||||
|
xmlFree (block_align_str);
|
||||||
xmlFree (codec_data_str);
|
xmlFree (codec_data_str);
|
||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
|
|
Loading…
Reference in a new issue