summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stream/stream_lavf.c4
1 files changed, 4 insertions, 0 deletions
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;
}