mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +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();
|
bool started = mp->StartWebtv();
|
||||||
printf("%s: started: %d\n", __func__, started);fflush(stdout);
|
printf("%s: started: %d\n", __func__, started);fflush(stdout);
|
||||||
|
bool chidused = false;
|
||||||
|
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
if (!webtv_started)
|
if (!webtv_started)
|
||||||
started = false;
|
started = false;
|
||||||
else if (!started)
|
else if (!started){
|
||||||
g_RCInput->postMsg(NeutrinoMessages::EVT_ZAP_FAILED, (neutrino_msg_data_t) chid);
|
g_RCInput->postMsg(NeutrinoMessages::EVT_ZAP_FAILED, (neutrino_msg_data_t) chid);
|
||||||
|
chidused = true;
|
||||||
|
}
|
||||||
webtv_started = started;
|
webtv_started = started;
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
|
||||||
@@ -715,6 +718,7 @@ void* CMoviePlayerGui::bgPlayThread(void *arg)
|
|||||||
if (eof > 5) {
|
if (eof > 5) {
|
||||||
printf("CMoviePlayerGui::bgPlayThread: playback stopped, try to rezap...\n");
|
printf("CMoviePlayerGui::bgPlayThread: playback stopped, try to rezap...\n");
|
||||||
g_RCInput->postMsg(NeutrinoMessages::EVT_WEBTV_ZAP_COMPLETE, (neutrino_msg_data_t) chid);
|
g_RCInput->postMsg(NeutrinoMessages::EVT_WEBTV_ZAP_COMPLETE, (neutrino_msg_data_t) chid);
|
||||||
|
chidused = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pos = mp->position;
|
pos = mp->position;
|
||||||
@@ -728,6 +732,9 @@ void* CMoviePlayerGui::bgPlayThread(void *arg)
|
|||||||
}
|
}
|
||||||
printf("%s: play end...\n", __func__);fflush(stdout);
|
printf("%s: play end...\n", __func__);fflush(stdout);
|
||||||
mp->PlayFileEnd();
|
mp->PlayFileEnd();
|
||||||
|
if(!chidused)
|
||||||
|
delete [] chid;
|
||||||
|
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user