GNOME Bugzilla – Bug 703312
matroskademux: missing profile field in caps for aac audio
Last modified: 2013-07-01 15:32:39 UTC
Hi, my hardware supports only aac lc profile. I have added that to the caps of the sink, but still the sink is used instead of faad to decode the audio. It seems that the reason is that no profile fields are generated by matroska demux for aac audio data. I have generated a patch which works for me. I'm no expert, so I'm not quite sure whether this patch diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index c586f55..6e23d75 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -5442,6 +5442,8 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * "stream-format", G_TYPE_STRING, "raw", NULL); gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, priv, NULL); *codec_name = g_strdup_printf ("MPEG-%d AAC audio", mpegversion); + if (context && context->codec_priv_size > 0) + gst_codec_utils_aac_caps_set_level_and_profile(caps, context->codec_priv, context->codec_priv_size); gst_buffer_unref (priv); } } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_TTA)) { or this patch diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index c586f55..afc2e2c 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -5444,6 +5444,9 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * *codec_name = g_strdup_printf ("MPEG-%d AAC audio", mpegversion); gst_buffer_unref (priv); } + + if (context && context->codec_priv_size > 0) + gst_codec_utils_aac_caps_set_level_and_profile(caps, context->codec_priv, context->codec_priv_size); } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_TTA)) { caps = gst_caps_new_simple ("audio/x-tta", "width", G_TYPE_INT, audiocontext->bitdepth, NULL); is correct.
commit 75b5a54f172970ac5cf9a7ee43eb350120e906ab Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Mon Jul 1 10:59:07 2013 +0200 matroskademux: Add MPEG4 video profile/level to the caps commit 423bddac6a9921641f0661a69ea9c561a598cfcd Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Mon Jul 1 10:56:28 2013 +0200 matroskademux: Add AAC profile/level to the caps https://bugzilla.gnome.org/show_bug.cgi?id=703312
This shouldn't really be a problem though, as aacparse would be plugged after the matroska demuxer and that one will add profile/level to the caps.
Thanks!