From 090cf943ed37cf6122e4035704bc7a9b220cfdb4 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Thu, 24 Nov 2022 17:39:50 +0000 Subject: [PATCH] avviddec: Report flow error when decoder refused packet 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: --- subprojects/gst-libav/ext/libav/gstavviddec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-libav/ext/libav/gstavviddec.c b/subprojects/gst-libav/ext/libav/gstavviddec.c index f156a1145e..031e06beb9 100644 --- a/subprojects/gst-libav/ext/libav/gstavviddec.c +++ b/subprojects/gst-libav/ext/libav/gstavviddec.c @@ -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; } }