summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-06-24 02:26:03 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-06-24 02:26:03 (GMT)
commit39e2fff8d95b1db2256ffce1a18692e236cf042f (patch)
tree373df516dd2a31b2fa9b84a1e4155514a14dd7ff
parentd172a81a24317425821a871cba0bfed4965685a7 (diff)
DVD: Correct fix for dvd menu button crash.
Refs #9677
-rw-r--r--mythtv/libs/libmythtv/subtitlescreen.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/mythtv/libs/libmythtv/subtitlescreen.cpp b/mythtv/libs/libmythtv/subtitlescreen.cpp
index 2d88c91..0b4833a 100644
--- a/mythtv/libs/libmythtv/subtitlescreen.cpp
+++ b/mythtv/libs/libmythtv/subtitlescreen.cpp
@@ -536,20 +536,20 @@ void SubtitleScreen::DisplayDVDButton(AVSubtitle* dvdButton, QRect &buttonPos)
QImage bg_image(hl_button->pict.data[0], w, h, w, QImage::Format_Indexed8);
uint32_t *bgpalette = (uint32_t *)(hl_button->pict.data[1]);
- QVector<unsigned int> bg_palette(16);
- for (int i = 0; i < 16; i++)
- bg_palette.append(bgpalette[i]);
+ QVector<uint32_t> bg_palette(4);
+ for (int i = 0; i < 4; i++)
+ bg_palette[i] = bgpalette[i];
bg_image.setColorTable(bg_palette);
// copy button region of background image
const QRect fg_rect(buttonPos.translated(-hl_button->x, -hl_button->y));
QImage fg_image = bg_image.copy(fg_rect);
- QVector<unsigned int> fg_palette;
+ QVector<uint32_t> fg_palette(4);
uint32_t *fgpalette = (uint32_t *)(dvdButton->rects[1]->pict.data[1]);
if (fgpalette)
{
- for (int i = 0; i < AVPALETTE_COUNT; i++)
- fg_palette.push_back(fgpalette[i]);
+ for (int i = 0; i < 4; i++)
+ fg_palette[i] = fgpalette[i];
fg_image.setColorTable(fg_palette);
}