mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Fix bug: Grabbing JPG image fails while suspended.
This commit is contained in:
parent
98f73f2199
commit
c4ad13c53f
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Fix bug: Grabbing a JPG image fails while suspended.
|
||||||
Add support for hot keys.
|
Add support for hot keys.
|
||||||
Add support to use characters input in edit mode.
|
Add support to use characters input in edit mode.
|
||||||
Adds trick speed support.
|
Adds trick speed support.
|
||||||
|
@ -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)
|
uint8_t *GrabImage(int *size, int jpeg, int quality, int width, int height)
|
||||||
{
|
{
|
||||||
if (jpeg) {
|
if (jpeg) {
|
||||||
uint8_t *jpg_image;
|
|
||||||
uint8_t *image;
|
uint8_t *image;
|
||||||
int raw_size = 0;
|
int raw_size;
|
||||||
|
|
||||||
|
raw_size = 0;
|
||||||
image = VideoGrab(&raw_size, &width, &height, 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);
|
jpg_image = CreateJpeg(image, size, quality, width, height);
|
||||||
|
|
||||||
free(image);
|
free(image);
|
||||||
return jpg_image;
|
return jpg_image;
|
||||||
}
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (width != -1 && height != -1) {
|
if (width != -1 && height != -1) {
|
||||||
Warning(_("softhddev: scaling unsupported\n"));
|
Warning(_("softhddev: scaling unsupported\n"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user