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/7390>
This commit is contained in:
Sebastian Dröge 2024-08-21 11:05:11 +03:00
parent 1b5f026119
commit 7daa040d24

View file

@ -325,7 +325,7 @@ gst_ffmpeg_pipe_read (void *priv_data, uint8_t * buf, int size)
} }
GST_FFMPEG_PIPE_MUTEX_UNLOCK (ffpipe); GST_FFMPEG_PIPE_MUTEX_UNLOCK (ffpipe);
return size; return size > 0 ? size : AVERROR_EOF;
} }
int int