From c5504d2676f28ad791e34ef0b80271e5c6e0992b Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 2 May 2005 10:52:46 +0000 Subject: Fixed bug invoking infinite loop, when snapshot is requested. --- src/decoder.cc | 10 ++++++++-- 1 file 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; -- cgit v1.2.3