mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
src/gui/movieplayer.cpp delete chid if not used
This commit is contained in:
@@ -694,12 +694,15 @@ void* CMoviePlayerGui::bgPlayThread(void *arg)
|
||||
|
||||
bool started = mp->StartWebtv();
|
||||
printf("%s: started: %d\n", __func__, started);fflush(stdout);
|
||||
bool chidused = false;
|
||||
|
||||
mutex.lock();
|
||||
if (!webtv_started)
|
||||
started = false;
|
||||
else if (!started)
|
||||
else if (!started){
|
||||
g_RCInput->postMsg(NeutrinoMessages::EVT_ZAP_FAILED, (neutrino_msg_data_t) chid);
|
||||
chidused = true;
|
||||
}
|
||||
webtv_started = started;
|
||||
mutex.unlock();
|
||||
|
||||
@@ -715,6 +718,7 @@ void* CMoviePlayerGui::bgPlayThread(void *arg)
|
||||
if (eof > 5) {
|
||||
printf("CMoviePlayerGui::bgPlayThread: playback stopped, try to rezap...\n");
|
||||
g_RCInput->postMsg(NeutrinoMessages::EVT_WEBTV_ZAP_COMPLETE, (neutrino_msg_data_t) chid);
|
||||
chidused = true;
|
||||
break;
|
||||
}
|
||||
pos = mp->position;
|
||||
@@ -728,6 +732,9 @@ void* CMoviePlayerGui::bgPlayThread(void *arg)
|
||||
}
|
||||
printf("%s: play end...\n", __func__);fflush(stdout);
|
||||
mp->PlayFileEnd();
|
||||
if(!chidused)
|
||||
delete [] chid;
|
||||
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user