From 6ca6b8c5530e9c67c8deff067a9a004bb809c8de 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 e7c9e5c7c5..e211b63fdf 100644 --- a/subprojects/gst-libav/ext/libav/gstavprotocol.c +++ b/subprojects/gst-libav/ext/libav/gstavprotocol.c @@ -321,7 +321,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