Update of /cvsroot/playerstage/code/player/server/drivers/camera/imageseq
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10946/server/drivers/camera/imageseq

Modified Files:
        .cvsignore imageseq.cc 
Log Message:
applied Toby's patch to replace fixed-size arrays

Index: .cvsignore
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/imageseq/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore  17 Sep 2007 02:18:57 -0000      1.2
--- .cvsignore  1 Nov 2007 22:16:18 -0000       1.3
***************
*** 2,4 ****
--- 2,6 ----
  Makefile.in
  .deps
+ .libs
  *.la
+ *.lo

Index: imageseq.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/imageseq/imageseq.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** imageseq.cc 23 Aug 2007 19:58:43 -0000      1.6
--- imageseq.cc 1 Nov 2007 22:16:18 -0000       1.7
***************
*** 239,244 ****
    this->data.compression = PLAYER_CAMERA_COMPRESS_RAW;
    
! 
!   this->data.image_count = image->imageSize;
    switch (image->depth)
    {
--- 239,248 ----
    this->data.compression = PLAYER_CAMERA_COMPRESS_RAW;
    
!   if (this->data.image_count != image->imageSize || this->data.image == NULL)
!   {
!     this->data.image_count = image->imageSize;
!     delete [] this->data.image;
!     this->data.image = new unsigned char [this->data.image_count];
!   }
    switch (image->depth)
    {
***************
*** 269,278 ****
        break;
    }
-   // Check image size
-   if (this->data.image_count > PLAYER_CAMERA_IMAGE_SIZE)
-   {
-     PLAYER_ERROR1("image size is too large [%d]", this->data.image_count);
-     return -1;
-   }
    // Copy the pixels
    if (image->nChannels == 1) {
--- 273,276 ----
***************
*** 305,313 ****
  void ImageSeq::WriteData()
  {
!   size_t size;
!   
!   size = sizeof(this->data) - sizeof(this->data.image) + 
this->data.image_count;
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE, 
&this->data, size, NULL);
!       
    return;
  }
--- 303,307 ----
  void ImageSeq::WriteData()
  {
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE, 
&this->data);
    return;
  }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to