From e22c3033afd8d9a9402135e7fdf71e9a077d4163 Mon Sep 17 00:00:00 2001 From: BPanther Date: Thu, 6 Feb 2020 18:46:29 +0100 Subject: [PATCH] sh4 fix mp3 (thx DBoxOldie) --- libeplayer3-sh4/input.cpp | 5 +++-- libeplayer3-sh4/player.cpp | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libeplayer3-sh4/input.cpp b/libeplayer3-sh4/input.cpp index 77f7d23..4663df6 100644 --- a/libeplayer3-sh4/input.cpp +++ b/libeplayer3-sh4/input.cpp @@ -265,8 +265,9 @@ bool Input::Play() } if (!player->isBackWard) { int64_t pts = calcPts(stream, packet.pts); - if (!player->output.Write(stream, &packet, _videoTrack ? pts : 0)) - logprintf("writing data to audio device failed\n"); + //if (!player->output.Write(stream, &packet, _videoTrack ? pts : 0)) // DBO: why pts only at video tracks ? + if (!player->output.Write(stream, &packet, pts)) + logprintf("writing data to audio device failed\n"); } audioSeen = true; } else if (_subtitleTrack && (_subtitleTrack->stream == stream)) { diff --git a/libeplayer3-sh4/player.cpp b/libeplayer3-sh4/player.cpp index 37ad7c1..3fad845 100644 --- a/libeplayer3-sh4/player.cpp +++ b/libeplayer3-sh4/player.cpp @@ -317,7 +317,9 @@ bool Player::SlowMotion(int repeats) bool Player::Seek(int64_t pos, bool absolute) { - output.Clear(); + if (GetVideoPid()) + /* Don't Clear if no video track */ + output.Clear(); return input.Seek(pos, absolute); }