From 02dd1be4a1ab24795a10ca769e2998dec28806f7 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 3 Mar 2023 00:42:51 +0100 Subject: [PATCH] Stop on decoder frame push error On push, frame sinks report downstream errors to stop upstream components. Do not ignore the error. --- app/src/decoder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/decoder.c b/app/src/decoder.c index e87cfd6b..ecad8373 100644 --- a/app/src/decoder.c +++ b/app/src/decoder.c @@ -99,11 +99,11 @@ sc_decoder_push(struct sc_decoder *decoder, const AVPacket *packet) { // a frame was received bool ok = sc_frame_source_sinks_push(&decoder->frame_source, decoder->frame); - // A frame lost should not make the whole pipeline fail. The error, if - // any, is already logged. - (void) ok; - av_frame_unref(decoder->frame); + if (!ok) { + // Error already logged + return false; + } } return true;