Skip to content

Commit

Permalink
Subtitles: Reset the external subtitle filename. Refs #11618
Browse files Browse the repository at this point in the history
This ensures that during Live TV, .srt subtitles from the previous
program are not accidentally used for the next program.
  • Loading branch information
stichnot committed Jul 1, 2013
1 parent f5e11be commit 66f80e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/fileringbuffer.cpp
Expand Up @@ -186,6 +186,7 @@ bool FileRingBuffer::OpenFile(const QString &lfilename, uint retry_ms)

filename = lfilename;
safefilename = lfilename;
subtitlefilename.clear();

if (remotefile)
{
Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -2676,8 +2676,9 @@ void MythPlayer::JumpToProgram(void)
TVState desiredState = player_ctx->GetState();
bool isInProgress =
desiredState == kState_WatchingRecording || kState_WatchingLiveTV;
if (!subfn.isEmpty() && GetSubReader())
GetSubReader()->LoadExternalSubtitles(subfn, isInProgress);
if (GetSubReader())
GetSubReader()->LoadExternalSubtitles(subfn, isInProgress &&
!subfn.isEmpty());

if (!player_ctx->buffer->IsOpen())
{
Expand Down

0 comments on commit 66f80e0

Please sign in to comment.