summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordeva <deva>2005-05-02 10:52:46 +0000
committerdeva <deva>2005-05-02 10:52:46 +0000
commitc5504d2676f28ad791e34ef0b80271e5c6e0992b (patch)
treeb035ca7d973bee9b8a99e5a0d04b9991b2eb3e0a /src
parent6d7b4b50ca9f159b9c422d6e7668c33ddd7992a1 (diff)
Fixed bug invoking infinite loop, when snapshot is requested.
Diffstat (limited to 'src')
-rw-r--r--src/decoder.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/decoder.cc b/src/decoder.cc
index 214e8bc..a76105f 100644
--- a/src/decoder.cc
+++ b/src/decoder.cc
@@ -25,6 +25,10 @@
*/
/*
* $Log$
+ * Revision 1.25 2005/05/02 10:52:46 deva
+ *
+ * Fixed bug invoking infinite loop, when snapshot is requested.
+ *
* Revision 1.24 2005/05/02 10:35:23 deva
* Fixed wrongly showed snapshot thumbnails.
*
@@ -114,13 +118,13 @@ void Decoder::decode()
b_freeze = false;
local_record = b_record;
- if(b_shoot) {
+ if(local_shoot) {
pthread_mutex_lock(&shot_mutex);
if(!shot) shot = new Frame(ptr, DVPACKAGE_SIZE);
pthread_mutex_unlock(&shot_mutex);
}
- if(b_freeze) {
+ if(local_freeze) {
pthread_mutex_lock(&shot_mutex);
if(shot) delete shot;
shot = new Frame(ptr, DVPACKAGE_SIZE);
@@ -182,7 +186,9 @@ void Decoder::shoot(unsigned char *rgb)
// Wait for shot to be taken
while(1) {
pthread_mutex_lock(&shot_mutex);
+ fprintf(stderr, ":"); fflush(stderr);
if(shot) {
+ fprintf(stderr, "."); fflush(stderr);
getScreenshot(shot, rgb);
delete shot;
shot = NULL;