From 3766914a184635896d05b2eda7d2addf86e86f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 22 Aug 2013 18:39:59 +0100 Subject: [PATCH] rtsp-media-factory-uri: check AAC properly for whether it's parsed or not For AAC we need to check for framed=true instead of parsed=true. https://bugzilla.gnome.org/show_bug.cgi?id=701384 --- gst/rtsp-server/rtsp-media-factory-uri.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gst/rtsp-server/rtsp-media-factory-uri.c b/gst/rtsp-server/rtsp-media-factory-uri.c index 46300a9f62..702987b577 100644 --- a/gst/rtsp-server/rtsp-media-factory-uri.c +++ b/gst/rtsp-server/rtsp-media-factory-uri.c @@ -352,8 +352,15 @@ find_payloader (GstRTSPMediaFactoryURI * urifact, GstCaps * caps) if (list) { GstStructure *structure = gst_caps_get_structure (caps, 0); gboolean parsed = FALSE; + gint mpegversion = 0; - gst_structure_get_boolean (structure, "parsed", &parsed); + if (!gst_structure_get_boolean (structure, "parsed", &parsed) && + gst_structure_has_name (structure, "audio/mpeg") && + gst_structure_get_int (structure, "mpegversion", &mpegversion) && + (mpegversion == 2 || mpegversion == 4)) { + /* for AAC it's framed=true instead of parsed=true */ + gst_structure_get_boolean (structure, "framed", &parsed); + } /* Avoid plugging parsers in a loop. This is not 100% correct, as some * parsers don't set parsed=true in caps. We should do something like