dvdplayer: reevaluate HasVideo/Audio after a stream change #2459

Merged
2 commits merged into from Apr 3, 2013
Jump to file or symbol
Failed to load files and symbols.
+7 −2
Split
@@ -788,6 +788,13 @@ bool CDVDPlayer::ReadPacket(DemuxPacket*& packet, CDemuxStream*& stream)
m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_DEMUX);
m_SelectionStreams.Update(m_pInputStream, m_pDemuxer);
OpenDefaultStreams(false);
+
+ // reevaluate HasVideo/Audio, we may have switched from/to a radio channel
+ if(m_CurrentVideo.id < 0)
+ m_HasVideo = false;
+ if(m_CurrentAudio.id < 0)
+ m_HasAudio = false;
+
return true;
}
@@ -308,8 +308,6 @@ bool CPVRClients::SwitchChannel(const CPVRChannel &channel)
!GetPlayingChannel(currentChannel) ||
// different backend
currentChannel->ClientID() != channel.ClientID() ||
- // different type
- currentChannel->IsRadio() != channel.IsRadio() ||
// stream URL should always be opened as a new file
!channel.StreamURL().IsEmpty() || !currentChannel->StreamURL().IsEmpty())
{