1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed possible compilation errors with libjpeg

This commit is contained in:
Klaus Schmidinger 2020-11-22 13:32:05 +01:00
parent 272231467a
commit ad55da4ef9
3 changed files with 11 additions and 7 deletions

View File

@ -3651,3 +3651,6 @@ Stefan Verse <Verse@amotronics.de>
Jens Schleusener <Jens.Schleusener@fossies.org> Jens Schleusener <Jens.Schleusener@fossies.org>
for reporting several typos for reporting several typos
Bernd Kuhls <bernd.kuhls@t-online.de>
for fixing possible compilation errors with libjpeg

View File

@ -9536,7 +9536,7 @@ Video Disk Recorder Revision History
cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this
(thanks to Helmut Binder). (thanks to Helmut Binder).
2020-11-20: 2020-11-22:
- Fixed multiple recording entries in case a recording is started during the initial - Fixed multiple recording entries in case a recording is started during the initial
reading of the video directory (reported by Claus Muus). reading of the video directory (reported by Claus Muus).
@ -9545,3 +9545,4 @@ Video Disk Recorder Revision History
- Fixed a crash in case an error occurs when setting a remote timer. - Fixed a crash in case an error occurs when setting a remote timer.
- Fixed allocating memory for cImage (reported by Christoph Haubrich). - Fixed allocating memory for cImage (reported by Christoph Haubrich).
- Fixed parsing the '-l' command line option (reported by Harald Milz). - Fixed parsing the '-l' command line option (reported by Harald Milz).
- Fixed possible compilation errors with libjpeg (thanks to Bernd Kuhls).

12
tools.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: tools.c 4.12 2020/06/10 20:52:10 kls Exp $ * $Id: tools.c 4.13 2020/11/22 13:32:05 kls Exp $
*/ */
#include "tools.h" #include "tools.h"
@ -1272,15 +1272,15 @@ static boolean JpegCompressEmptyOutputBuffer(j_compress_ptr cinfo)
} }
else { else {
esyslog("ERROR: out of memory"); esyslog("ERROR: out of memory");
return false; return FALSE;
} }
if (jcd->mem) { if (jcd->mem) {
cinfo->dest->next_output_byte = jcd->mem + Used; cinfo->dest->next_output_byte = jcd->mem + Used;
cinfo->dest->free_in_buffer = jcd->size - Used; cinfo->dest->free_in_buffer = jcd->size - Used;
return true; return TRUE;
} }
} }
return false; return FALSE;
} }
static void JpegCompressTermDestination(j_compress_ptr cinfo) static void JpegCompressTermDestination(j_compress_ptr cinfo)
@ -1325,8 +1325,8 @@ uchar *RgbToJpeg(uchar *Mem, int Width, int Height, int &Size, int Quality)
cinfo.in_color_space = JCS_RGB; cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo); jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, Quality, true); jpeg_set_quality(&cinfo, Quality, TRUE);
jpeg_start_compress(&cinfo, true); jpeg_start_compress(&cinfo, TRUE);
int rs = Width * 3; int rs = Width * 3;
JSAMPROW rp[Height]; JSAMPROW rp[Height];