diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index e5e5d89c2..c34af0661 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -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); }