mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
movieplayer: reindent callInfoViewer()
make the callInfoViewer() function more readable by reindenting it, additionally fix a theoretically possible buffer overflow in the filename copying code git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@892 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -1266,16 +1266,24 @@ printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %x\n", i
|
||||
if (g_settings.mode_clock)
|
||||
InfoClock->StartClock();
|
||||
}
|
||||
void CMoviePlayerGui::callInfoViewer(const std::string & epg_title, const std::string & epg_info1, const std::string & epg_channel, const int duration, const int curr_pos)
|
||||
|
||||
void CMoviePlayerGui::callInfoViewer(const std::string & epg_title, const std::string & epg_info1,
|
||||
const std::string & epg_channel, const int duration, const int curr_pos)
|
||||
{
|
||||
if (isMovieBrowser) {
|
||||
g_InfoViewer->showMovieTitle(playstate, epg_channel.c_str(), epg_title, epg_info1, duration, curr_pos);
|
||||
} else {
|
||||
char temp_name[255];
|
||||
g_InfoViewer->showMovieTitle(playstate, epg_channel.c_str(), epg_title, epg_info1,
|
||||
duration, curr_pos);
|
||||
return;
|
||||
}
|
||||
|
||||
/* not moviebrowser => use the filename as title */
|
||||
char temp_name[255] = { 0 };
|
||||
const char *slash = strrchr(filename, '/');
|
||||
if (slash) {
|
||||
slash++;
|
||||
int len = strlen(slash);
|
||||
if (len > 254)
|
||||
len = 254;
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (slash[i] == '_')
|
||||
temp_name[i] = ' ';
|
||||
@@ -1284,10 +1292,9 @@ void CMoviePlayerGui::callInfoViewer(const std::string & epg_title, const std::s
|
||||
}
|
||||
temp_name[len] = 0;
|
||||
}
|
||||
// g_InfoViewer->showTitle(0, temp_name, 0, 0); // UTF-8
|
||||
g_InfoViewer->showMovieTitle(playstate, temp_name, "", "", duration, curr_pos);
|
||||
}
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::showHelpTS()
|
||||
{
|
||||
Helpbox helpbox;
|
||||
|
Reference in New Issue
Block a user