Skip to content

Commit 71c0e5c

Browse files
authored
Merge pull request #182 from databrary/hotfix_mute_status
Restore player mute status after a seek
2 parents 5838d72 + 6ac9c18 commit 71c0e5c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/java/org/datavyu/plugins/ffmpeg/FfmpegMediaPlayer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,14 @@ protected void playerSeek(double streamTime) throws MediaException {
3535
// In most cases seek accurate, with the exception of large backward playback rates
3636
int seek_flag = (!isStartTimeUpdated && getRate() < -1) ? SEEK_FAST_FLAG : SEEK_ACCURATE_FLAG;
3737
// Mute player when seeking and not playing
38-
if (getState() != PlayerState.PLAYING) {
38+
boolean wasMute = getMute();
39+
if (!getMute() && getState() != PlayerState.PLAYING) {
3940
setMute(true);
4041
}
4142
playerSeek(streamTime, seek_flag);
42-
setMute(false);
43+
if (!wasMute) {
44+
setMute(false);
45+
}
4346
}
4447

4548
@Override

0 commit comments

Comments
 (0)