diff options
author | FireFly <> | 2012-02-13 20:15:25 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-02-13 20:15:25 +0100 |
commit | 56edfd4f5424d79f2cf6c9c0fc639f0eb6140380 (patch) | |
tree | 1e8e8c47c84c5bbb042fc436d7f895ae799a18f3 | |
parent | 0a1a258d2aed97912f93c355be274b2969123190 (diff) | |
download | vdr-plugin-softhddevice-56edfd4f5424d79f2cf6c9c0fc639f0eb6140380.tar.gz vdr-plugin-softhddevice-56edfd4f5424d79f2cf6c9c0fc639f0eb6140380.tar.bz2 |
Fix bug: unscaled jpeg includes PNG header.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | video.c | 8 |
2 files changed, 14 insertions, 3 deletions
@@ -2,6 +2,15 @@ User johns Date: Release Version 0.4.7 + +User FireFly +Date: Mon Feb 13 20:14:11 CET 2012 + + Fix bug: unscaled jpeg includes PNG header. + +User johns +Date: Mon Feb 13 14:58:26 CET 2012 + VDPAU: Studio levels could be configured in the setup menu. Window size defaults to fullscreen, if no geometry is given. @@ -8678,6 +8678,7 @@ uint8_t *VideoGrab(int *size, int *width, int *height, int write_header) scale_width = *width; scale_height = *height; + n = 0; data = VideoUsedModule->GrabOutput(size, width, height); if (scale_width <= 0) { @@ -8688,7 +8689,6 @@ uint8_t *VideoGrab(int *size, int *width, int *height, int write_header) } // hardware didn't scale for us, use simple software scaler if (scale_width != *width && scale_height != *height) { - n = 0; if (write_header) { n = snprintf(buf, sizeof(buf), "P6\n%d\n%d\n255\n", scale_width, scale_height); @@ -8730,8 +8730,10 @@ uint8_t *VideoGrab(int *size, int *width, int *height, int write_header) // grabed image of correct size convert BGRA -> RGB } else { - n = snprintf(buf, sizeof(buf), "P6\n%d\n%d\n255\n", *width, - *height); + if (write_header) { + n = snprintf(buf, sizeof(buf), "P6\n%d\n%d\n255\n", *width, + *height); + } rgb = malloc(*width * *height * 3 + n); if (!rgb) { Error(_("video: out of memory\n")); |