summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kaffeine/src/player-parts/xine-part/kxinewidget.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kaffeine/src/player-parts/xine-part/kxinewidget.cpp b/kaffeine/src/player-parts/xine-part/kxinewidget.cpp
index c6535e6..7361e19 100644
--- a/kaffeine/src/player-parts/xine-part/kxinewidget.cpp
+++ b/kaffeine/src/player-parts/xine-part/kxinewidget.cpp
@@ -3834,17 +3834,18 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide
int width, height, ratio, format;
// double desired_ratio, image_ratio;
- if (!xine_get_current_frame(m_xineStream, &width, &height, &ratio, &format, NULL))
+ if (!xine_get_current_frame_s(m_xineStream, &width, &height, &ratio, &format, nullptr, nullptr))
return;
- yuv = new uint8_t[((width+8) * (height+1) * 2)];
+ int yuv_size = ((width + 8) * (height + 1)) * 2;
+ yuv = new uint8_t[yuv_size];
if (yuv == NULL)
{
errorOut("Not enough memory to make screenshot!");
return;
}
- xine_get_current_frame(m_xineStream, &width, &height, &ratio, &format, yuv);
+ xine_get_current_frame_s(m_xineStream, &width, &height, &ratio, &format, yuv, &yuv_size);
videoWidth = width;
videoHeight = height;