mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
avprotocol: Return EOF when stream is out of data
According to the ffmpeg documentation[1] the read_packet function should never return 0. ffmpegdata_peek returns 0 when the stream is EOF causing us to fail detecting EOF and never close the pipeline, continually spinning on more data. ffmpeg instead wants an AVERROR_EOF code for to signal EOF. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4999>
This commit is contained in:
parent
efa0a3ec6a
commit
825f52d38b
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ gst_ffmpegdata_read (void *priv_data, unsigned char *buf, int size)
|
|||
|
||||
GST_DEBUG ("Returning %d bytes", res);
|
||||
|
||||
return res;
|
||||
return res == 0 ? AVERROR_EOF : res;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in a new issue