svtjpegxsdec: handle decode errors more gracefully
authorTim-Philipp Müller <tim@centricular.com>
Mon, 16 Dec 2024 19:01:15 +0000 (19:01 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 19 Dec 2024 15:47:13 +0000 (15:47 +0000)
Use GST_VIDEO_DECODER_ERROR instead of just erroring out
unconditionally, so that the error handling behaviour is
determined by the "max-errors" property and we'll just
continue after decoding errors now instead of erroring out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8163>

subprojects/gst-plugins-bad/ext/svtjpegxs/gstsvtjpegxsdec.c

index 5149fa3e57c53cfb911cdf657fd3c07389adfcfe..98c3033cde2dc4ebf522e83e103da5607538eeb6 100644 (file)
@@ -598,9 +598,8 @@ send_packet_error:
 
 get_frame_error:
   {
-    GST_ELEMENT_ERROR (jxsdec, STREAM, DECODE, (NULL),
-        ("Error decoding image, error code 0x%08x", dec_ret));
-    flow = GST_FLOW_ERROR;
+    GST_VIDEO_DECODER_ERROR (jxsdec, 1, STREAM, DECODE,
+        (NULL), ("Error decoding image, error code 0x%08x", dec_ret), flow);
     goto out_unmap;
   }
 }