Fix bug: Grabbing JPG image fails while suspended.

This commit is contained in:
Johns 2012-02-19 20:52:57 +01:00
parent 98f73f2199
commit c4ad13c53f
2 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,7 @@
User johns
Date:
Fix bug: Grabbing a JPG image fails while suspended.
Add support for hot keys.
Add support to use characters input in edit mode.
Adds trick speed support.

View File

@ -1186,16 +1186,21 @@ uint8_t *CreateJpeg(uint8_t * image, int raw_size, int *size, int quality,
uint8_t *GrabImage(int *size, int jpeg, int quality, int width, int height)
{
if (jpeg) {
uint8_t *jpg_image;
uint8_t *image;
int raw_size = 0;
int raw_size;
raw_size = 0;
image = VideoGrab(&raw_size, &width, &height, 0);
if (image) { // can fail, suspended, ...
uint8_t *jpg_image;
jpg_image = CreateJpeg(image, size, quality, width, height);
free(image);
return jpg_image;
}
return NULL;
}
if (width != -1 && height != -1) {
Warning(_("softhddev: scaling unsupported\n"));
}