summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-06-24 02:39:18 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-06-24 02:39:18 (GMT)
commit30993d65c6fa7c9133c459f1fda4c99058e35ba7 (patch)
treebbb1cc3b66ae485ad3a580ecd0a146a1b6bbff1e
parent572b95aa59d76a22aa0f4561ee25f6452366f420 (diff)
DVD: Fix crash when displaying dvd menu button.
Backported from master 39e2fff8d95b1db2256f 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 46b3dae..0988a9b 100644
--- a/mythtv/libs/libmythtv/subtitlescreen.cpp
+++ b/mythtv/libs/libmythtv/subtitlescreen.cpp
@@ -525,9 +525,9 @@ void SubtitleScreen::DisplayDVDButton(AVSubtitle* dvdButton, QRect &buttonPos)
if (!blank)
{
- QVector<unsigned int> bg_palette;
- for (int i = 0; i < AVPALETTE_COUNT; i++)
- bg_palette.push_back(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);
bg_image = bg_image.convertToFormat(QImage::Format_ARGB32);
AddScaledImage(bg_image, rect);
@@ -535,12 +535,12 @@ void SubtitleScreen::DisplayDVDButton(AVSubtitle* dvdButton, QRect &buttonPos)
}
QImage fg_image = bg_image.copy(buttonPos);
- 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);
}