After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703312 - matroskademux: missing profile field in caps for aac audio
matroskademux: missing profile field in caps for aac audio
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.1.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-29 14:34 UTC by betacentauri
Modified: 2013-07-01 15:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description betacentauri 2013-06-29 14:34:48 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.
Comment 1 Sebastian Dröge (slomo) 2013-07-01 09:03:37 UTC
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
Comment 2 Sebastian Dröge (slomo) 2013-07-01 09:05:41 UTC
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.
Comment 3 betacentauri 2013-07-01 15:32:39 UTC
Thanks!