From a1cc9838fa20ec350c06534ce34b493fdc9fbb6d Mon Sep 17 00:00:00 2001 From: basisbit Date: Fri, 4 Sep 2015 23:42:54 +0000 Subject: * fix end of file detection for videos with current ffmpeg versions * improve error text information of function TVideo_FFmpeg.DecodeFrame() git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3130 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UVideo.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/media') diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas index 7a3d066b..b8bd14a0 100644 --- a/src/media/UVideo.pas +++ b/src/media/UVideo.pas @@ -720,9 +720,14 @@ begin fEOF := true; Exit; end; + if (errnum = -541478725) then // LIBAVFORMAT_VERSION >= 56000000 tells us if EOF reached. + begin + fEOF := true; + Exit + end; // error occured, log and exit - Log.LogError('Video decoding error', 'TVideoPlayback_FFmpeg.DecodeFrame'); + Log.LogError('Video decoding error: ' + IntToStr(errnum), 'TVideoPlayback_FFmpeg.DecodeFrame'); Exit; end; -- cgit v1.2.3