aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/media/UAudioDecoder_FFmpeg.pas2
-rw-r--r--src/screens/UScreenSong.pas8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/media/UAudioDecoder_FFmpeg.pas b/src/media/UAudioDecoder_FFmpeg.pas
index 2badb84d..c64d79c2 100644
--- a/src/media/UAudioDecoder_FFmpeg.pas
+++ b/src/media/UAudioDecoder_FFmpeg.pas
@@ -728,7 +728,7 @@ begin
begin
// seeking failed
fErrorState := true;
- Log.LogStatus('Seek Error in "'+fFormatCtx^.filename+'"', 'UAudioDecoder_FFmpeg');
+ Log.LogError('Seek Error in "'+fFormatCtx^.filename+'"', 'UAudioDecoder_FFmpeg');
end
else
begin
diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas
index 764a0d47..6fe8d204 100644
--- a/src/screens/UScreenSong.pas
+++ b/src/screens/UScreenSong.pas
@@ -1791,6 +1791,7 @@ end;
procedure TScreenSong.StartMusicPreview();
var
Song: TSong;
+ PreviewPos: real;
begin
AudioPlayback.Close();
@@ -1809,7 +1810,12 @@ begin
begin
PreviewOpened := Interaction;
- AudioPlayback.Position := AudioPlayback.Length / 4;
+ PreviewPos := AudioPlayback.Length / 4;
+ // fix for invalid music file lengths
+ if (PreviewPos > 60.0) then
+ PreviewPos := 60.0;
+ AudioPlayback.Position := PreviewPos;
+
// set preview volume
if (Ini.PreviewFading = 0) then
begin