"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/depends/native/TexturePacker/src/decoder/PNGDecoder.cpp" between
xbmc-18.8-Leia.tar.gz and xbmc-18.9-Leia.tar.gz

About: XBMC is a software media player and entertainment hub for digital media that plays almost all popular audio and video formats around (new name "Kodi").

PNGDecoder.cpp  (xbmc-18.8-Leia):PNGDecoder.cpp  (xbmc-18.9-Leia)
skipping to change at line 215 skipping to change at line 215
// set the individual row_pointers to point at the correct offsets of image_da ta // set the individual row_pointers to point at the correct offsets of image_da ta
for (unsigned int i = 0; i < temp_height; i++) for (unsigned int i = 0; i < temp_height; i++)
{ {
row_pointers[i] = image_data + i * rowbytes; row_pointers[i] = image_data + i * rowbytes;
} }
// read the png into image_data through row_pointers // read the png into image_data through row_pointers
png_read_image(png_ptr, row_pointers); png_read_image(png_ptr, row_pointers);
frames.user = NULL;
DecodedFrame frame; DecodedFrame frame;
frame.rgbaImage.pixels = (char *)image_data; frame.rgbaImage.pixels = (char *)image_data;
frame.rgbaImage.height = temp_height; frame.rgbaImage.height = temp_height;
frame.rgbaImage.width = temp_width; frame.rgbaImage.width = temp_width;
frame.rgbaImage.bbp = 32; frame.rgbaImage.bbp = 32;
frame.rgbaImage.pitch = 4 * temp_width; frame.rgbaImage.pitch = 4 * temp_width;
frame.decoder = this;
frames.frameList.push_back(frame); frames.frameList.push_back(frame);
// clean up // clean up
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
delete [] row_pointers; delete [] row_pointers;
return true; return true;
} }
void PNGDecoder::FreeDecodedFrames(DecodedFrames &frames) void PNGDecoder::FreeDecodedFrame(DecodedFrame &frame)
{ {
for (unsigned int i = 0; i < frames.frameList.size(); i++) delete [] frame.rgbaImage.pixels;
{
delete [] frames.frameList[i].rgbaImage.pixels;
}
frames.clear();
} }
void PNGDecoder::FillSupportedExtensions() void PNGDecoder::FillSupportedExtensions()
{ {
m_supportedExtensions.push_back(".png"); m_supportedExtensions.push_back(".png");
} }
 End of changes. 4 change blocks. 
8 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)