From bfb7b0117fb4d139a46da6c28d784a569f8ab149 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Mar 2019 10:39:43 +0100 Subject: [PATCH] lib/ffmpeg/IOContext: allow partial reads --- NEWS | 2 ++ src/lib/ffmpeg/IOContext.hxx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a093ff0e7..73264e10f 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.22 (not yet released) +* input + - ffmpeg: allow partial reads ver 0.21.6 (not yet released) * protocol diff --git a/src/lib/ffmpeg/IOContext.hxx b/src/lib/ffmpeg/IOContext.hxx index 95ce637ee..c2a3e3409 100644 --- a/src/lib/ffmpeg/IOContext.hxx +++ b/src/lib/ffmpeg/IOContext.hxx @@ -71,8 +71,8 @@ public: } size_t Read(void *buffer, size_t size) { - int result = avio_read(io_context, - (unsigned char *)buffer, size); + int result = avio_read_partial(io_context, + (unsigned char *)buffer, size); if (result < 0) throw MakeFfmpegError(result, "avio_read() failed");