Skip to content
This repository

[Fix] Add missing audiochannels rule to PlayerSelectionRule.cpp #1784

Merged
1 commit merged into from about 1 year ago

1 participant

ScudLee
ScudLee

This adds the missing test against the audiochannels rule in PlayerSelectionRule.cpp. Fixes http://trac.xbmc.org/ticket/13536

I wasn't entirely sure what the best way to convert an integer to a string was, so I just copied this code from CSFTPSessionManager::CreateSession (which was about the only place I could find that already did it).

Deleted user ghost merged commit 59437d0 into from March 16, 2013
Deleted user ghost closed this March 16, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 14, 2012
ScudLee [Fix] Add missing audiochannels rule to PlayerSelectionRule.cpp. fixe…
…s #13536
2fa98c5
This page is out of date. Refresh to see the latest.
6  xbmc/cores/playercorefactory/PlayerSelectionRule.cpp
@@ -129,6 +129,12 @@ void CPlayerSelectionRule::GetPlayers(const CFileItem& item, VECPLAYERCORES &vec
129 129
     CStreamDetails streamDetails = item.GetVideoInfoTag()->m_streamDetails;
130 130
 
131 131
     if (CompileRegExp(m_audioCodec, regExp) && !MatchesRegExp(streamDetails.GetAudioCodec(), regExp)) return;
  132
+    
  133
+    std::stringstream itoa;
  134
+    itoa << streamDetails.GetAudioChannels();
  135
+    CStdString audioChannelsstr = itoa.str();
  136
+
  137
+    if (CompileRegExp(m_audioChannels, regExp) && !MatchesRegExp(audioChannelsstr, regExp)) return;
132 138
 
133 139
     if (CompileRegExp(m_videoCodec, regExp) && !MatchesRegExp(streamDetails.GetVideoCodec(), regExp)) return;
134 140
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.