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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7496>
This commit is contained in:
Sebastian Dröge 2024-08-21 11:05:11 +03:00 committed by GStreamer Marge Bot
parent b789d53b22
commit 6ca6b8c553

View file

@ -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