From f807cd8169460f9c17b66c819d34a56d4d81faaa Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 27 Jan 2022 14:49:33 -0800 Subject: [PATCH] FFmpeg Input: Just-in-case change to file reader Signed-off-by: Christopher Snowhill --- Plugins/FFMPEG/FFMPEGDecoder.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugins/FFMPEG/FFMPEGDecoder.m b/Plugins/FFMPEG/FFMPEGDecoder.m index 33fa6aef4..19cfbaab8 100644 --- a/Plugins/FFMPEG/FFMPEGDecoder.m +++ b/Plugins/FFMPEG/FFMPEGDecoder.m @@ -18,7 +18,9 @@ int ffmpeg_read(void *opaque, uint8_t *buf, int buf_size) { id source = (__bridge id) opaque; - return (int) [source read:buf amount:buf_size]; + long sizeRead = [source read:buf amount:buf_size]; + if (sizeRead == 0) return AVERROR_EOF; + return (int)sizeRead; } int ffmpeg_write(void *opaque, uint8_t *buf, int buf_size)