avviddec: Report flow error when decoder refused packet
authorPhilippe Normand <philn@igalia.com>
Thu, 24 Nov 2022 17:39:50 +0000 (17:39 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 30 Nov 2022 11:51:12 +0000 (11:51 +0000)
In cases where an invalid input packet is submitted to the decoder we emit a
warning but reporting the flow error upstream would also be useful. This came up
with a case were the application interacts directly with the decoder, using a
mechanism similar to GstHarness.

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

subprojects/gst-libav/ext/libav/gstavviddec.c

index f156a11..031e06b 100644 (file)
@@ -2164,7 +2164,8 @@ done:
 
 send_packet_failed:
   {
-    GST_WARNING_OBJECT (ffmpegdec, "Failed to send data for decoding");
+    GST_VIDEO_DECODER_ERROR (decoder, 1, STREAM, DECODE,
+        ("Failed to send data for decoding"), ("Invalid input packet"), ret);
     goto done;
   }
 }