diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-10-13 12:58:53 +0200 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-10-13 12:58:53 +0200 |
commit | c88a9d875cb30a7bd30257fdc5de5f4ac88a3f8b (patch) | |
tree | 0a6811e8e34742033e8067425e3e0979ce7fcfd7 /dxr3osd.c | |
parent | 8435197ec3e9b338936186a40e78f5f2364bb9ee (diff) | |
download | vdr-plugin-dxr3-c88a9d875cb30a7bd30257fdc5de5f4ac88a3f8b.tar.gz vdr-plugin-dxr3-c88a9d875cb30a7bd30257fdc5de5f4ac88a3f8b.tar.bz2 |
dont leak memory
Diffstat (limited to 'dxr3osd.c')
-rw-r--r-- | dxr3osd.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -235,6 +235,7 @@ void cDxr3Osd::Flush() int top = Top(); int left = Left(); + bool scaling = false; // check if we need to scale the osd if (horizontal < 720 || vertical < 576) { @@ -258,6 +259,7 @@ void cDxr3Osd::Flush() cBitmap *scaled = cScaler::scaleBitmap(bmap, width, height); scaled->Replace(*Palette); + scaling = true; bmap = scaled; } @@ -268,6 +270,12 @@ void cDxr3Osd::Flush() bmap->Clean(); } + // check if we need to free the bitmap allocated by the method + // cScaler::scaleBitmap + if (scaling) { + delete bmap; + } + #if 0 if (last->Elapsed() < cDxr3ConfigData::instance()->GetOsdFlushRate()) return; |