jpegparse: turn some bus warnings into object ones

For some cameras `gst_jpeg_parse_app0()` fails on a invalid segment.
While this is likely a driver or firmware bug that should be addressed
accordingly, it's not fatal and likely does not deserve a bus message on
every frame, flooding journals.

Turn down the volume of the warnings by turning them into object
warnings. If we conclude that in some cases we'd still want bus
warnings, they can be done more fine-grained in the
`gst_jpeg_parse_appX()` functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6490>
This commit is contained in:
Robert Mader 2024-03-30 15:57:36 +01:00 committed by GStreamer Marge Bot
parent 4b5a265571
commit 0a26a92b2b

View file

@ -937,22 +937,16 @@ gst_jpeg_parse_handle_frame (GstBaseParse * bparse, GstBaseParseFrame * frame,
GST_WARNING_OBJECT (parse, "Failed to parse com segment");
break;
case GST_JPEG_MARKER_APP0:
if (!gst_jpeg_parse_app0 (parse, &seg)) {
GST_ELEMENT_WARNING (parse, STREAM, FORMAT,
("Invalid data"), ("Failed to parse app0 segment"));
}
if (!gst_jpeg_parse_app0 (parse, &seg))
GST_WARNING_OBJECT (parse, "Failed to parse app0 segment");
break;
case GST_JPEG_MARKER_APP1:
if (!gst_jpeg_parse_app1 (parse, &seg)) {
GST_ELEMENT_WARNING (parse, STREAM, FORMAT,
("Invalid data"), ("Failed to parse app1 segment"));
}
if (!gst_jpeg_parse_app1 (parse, &seg))
GST_WARNING_OBJECT (parse, "Failed to parse app1 segment");
break;
case GST_JPEG_MARKER_APP14:
if (!gst_jpeg_parse_app14 (parse, &seg)) {
GST_ELEMENT_WARNING (parse, STREAM, FORMAT,
("Invalid data"), ("Failed to parse app14 segment"));
}
if (!gst_jpeg_parse_app14 (parse, &seg))
GST_WARNING_OBJECT (parse, "Failed to parse app14 segment");
break;
case GST_JPEG_MARKER_DHT:
case GST_JPEG_MARKER_DAC: