pbutils: descriptions: Don't warn on MPEG-1 audio caps without layer field

While this is not ideal and won't give too accurate codec descriptions,
it is what tsdemux produces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6511>
This commit is contained in:
Sebastian Dröge 2024-04-02 16:53:26 +03:00 committed by GStreamer Marge Bot
parent a780b9ed13
commit 4b5a265571

View file

@ -742,7 +742,7 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps)
switch (ver) {
case 1:
gst_structure_get_int (s, "layer", &layer);
if (gst_structure_get_int (s, "layer", &layer)) {
switch (layer) {
case 1:
case 2:
@ -752,6 +752,7 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps)
break;
}
GST_WARNING ("Unexpected MPEG-1 layer in %" GST_PTR_FORMAT, caps);
}
return g_strdup ("MPEG-1 Audio");
case 2:
return g_strdup ("MPEG-2 AAC");