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
This commit is contained in:
Tim-Philipp Müller 2013-08-22 18:39:59 +01:00
parent d74cbf2911
commit 3766914a18

View file

@ -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