From b100766c97ef55c33d125a5259dc6ffa1be86cbb Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 21 Feb 2014 16:56:04 +0400 Subject: [PATCH] gui/movieplayer.cpp: fix audio/subtitle pid reset on title change --- src/gui/movieplayer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 9522df8ff..6a93a36f1 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1367,6 +1367,8 @@ void CMoviePlayerGui::selectChapter() playback->SetPosition(positions[select], true); } else if (pselect >= 0) { numsubs = numpida = 0; + currentspid = -1; + currentapid = 0; playback->SetTitle(playlists[pselect]); } } @@ -1599,7 +1601,12 @@ void CMoviePlayerGui::selectAutoLang() std::map::const_iterator it; for(it = iso639.begin(); it != iso639.end(); ++it) { if (g_settings.pref_lang[i] == it->second && strncasecmp(language[j].c_str(), it->first.c_str(), 3) == 0) { - pref_idx = j; + bool enabled = true; + // TODO: better check of supported + std::string audioname; + addAudioFormat(j, audioname, enabled); + if (enabled) + pref_idx = j; break; } }