From 9ea9c4ec77e5d813bc4f6738eb80646a8d449e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 21 Aug 2024 11:05:11 +0300 Subject: [PATCH] avdemux: Never return 0 from read function Instead return AVERROR_EOF. The read function must never ever return 0 according to the documentation, and in practice this leads to infinite loops. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3369 Part-of: --- subprojects/gst-libav/ext/libav/gstavprotocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-libav/ext/libav/gstavprotocol.c b/subprojects/gst-libav/ext/libav/gstavprotocol.c index 9498323754..2fa1bce953 100644 --- a/subprojects/gst-libav/ext/libav/gstavprotocol.c +++ b/subprojects/gst-libav/ext/libav/gstavprotocol.c @@ -325,7 +325,7 @@ gst_ffmpeg_pipe_read (void *priv_data, uint8_t * buf, int size) } GST_FFMPEG_PIPE_MUTEX_UNLOCK (ffpipe); - return size; + return size > 0 ? size : AVERROR_EOF; } int