Skip to content

Commit

Permalink
[omximage] fixed omximage deadlock. don't use a static omximage in a …
Browse files Browse the repository at this point in the history
…static function.
  • Loading branch information
huceke committed Oct 26, 2012
1 parent b5fdf65 commit 057d24c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xbmc/pictures/Picture.cpp
Expand Up @@ -46,9 +46,13 @@ bool CPicture::CreateThumbnailFromSurface(const unsigned char *buffer, int width
if (URIUtils::GetExtension(thumbFile).Equals(".jpg"))
{
#if defined(HAS_OMXPLAYER)
COMXImage omxImage;
if (omxImage.CreateThumbnailFromSurface((BYTE *)buffer, width, height, XB_FMT_A8R8G8B8, stride, thumbFile.c_str()))
COMXImage *omxImage = new COMXImage();

This comment has been minimized.

Copy link
@elupus

elupus Oct 26, 2012

Contributor

shared_ptr....

This comment has been minimized.

Copy link
@elupus

elupus Oct 26, 2012

Contributor

also.. what does this change? it wasn't static before. it was just on stack.

if (omxImage && omxImage->CreateThumbnailFromSurface((BYTE *)buffer, width, height, XB_FMT_A8R8G8B8, stride, thumbFile.c_str()))
{
delete omxImage;
return true;
}
delete omxImage;
#endif
CJpegIO jpegImage;
if (jpegImage.CreateThumbnailFromSurface((BYTE *)buffer, width, height, XB_FMT_A8R8G8B8, stride, thumbFile.c_str()))
Expand Down

1 comment on commit 057d24c

@elupus
Copy link
Contributor

@elupus elupus commented on 057d24c Oct 26, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or to be more clear.. it doesn't change a thing :)

Please sign in to comment.