libtriple: avoid race conditions in cVideo::ShowPicture

ShowPicture() and Stop() were racing, and the calling order from
neutrino seems to be not necessarily "correct". With gcc-4.8 /
glibc-2.16 binaries it happened that on switching to radio mode,
ShowPicture() was called and then the Stop() from stopping video
playback happened. This broke the stillpicture. Fix by adding more
locks and explicitly bailing out of Stop() if a picture is shown.
This commit is contained in:
Stefan Seyfried
2013-12-02 00:58:37 +01:00
parent f403e3b3e2
commit e4dba8b30e
2 changed files with 23 additions and 1 deletions

View File

@@ -44,6 +44,7 @@ public:
video_play_state_t playstate;
vidDispMode_t croppingMode;
vidOutFmt_t outputformat;
bool pic_shown;
int scartvoltage;
int z[2]; /* zoomvalue for 4:3 (0) and 16:9 (1) in percent */
int *zoomvalue;