From e4c9526e081c58298153516956e0090179ae8c3e Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 26 May 2018 15:17:34 -0600 Subject: [PATCH] ffmpeg: Make read_packet return AVERROR_EOF Newer versions of FFmpeg deprecate returning 0 to indicate EOF, and instead request use of AVERROR_EOF. The oldest supported versions of FFmpeg/libav will treat any error code the same as returning 0. Fixes #315 --- panda/src/ffmpeg/ffmpegVirtualFile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/ffmpeg/ffmpegVirtualFile.cxx b/panda/src/ffmpeg/ffmpegVirtualFile.cxx index 0d97f0b5f4..b671ce0ba6 100644 --- a/panda/src/ffmpeg/ffmpegVirtualFile.cxx +++ b/panda/src/ffmpeg/ffmpegVirtualFile.cxx @@ -209,7 +209,7 @@ read_packet(void *opaque, uint8_t *buf, int size) { streampos remaining = self->_start + (streampos)self->_size - in->tellg(); if (remaining < ssize) { if (remaining <= 0) { - return 0; + return AVERROR_EOF; } ssize = remaining;