From 449d9725c91af467b154817dfd0603d80ba7f00b Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 Sep 2017 17:59:03 +0200 Subject: stream_lavf: use avio_read_partial() Possibly improves latency and such things. --- stream/stream_lavf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index dec8d4b277..80a27bd3e6 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -79,7 +79,11 @@ static int fill_buffer(stream_t *s, char *buffer, int max_len) AVIOContext *avio = s->priv; if (!avio) return -1; +#if LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 81, 100) + int r = avio_read_partial(avio, buffer, max_len); +#else int r = avio_read(avio, buffer, max_len); +#endif return (r <= 0) ? -1 : r; } -- cgit v1.2.3