diff options
-rw-r--r-- | src/app/captureFrame.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/app/captureFrame.cpp b/src/app/captureFrame.cpp index 4988999..41796b9 100644 --- a/src/app/captureFrame.cpp +++ b/src/app/captureFrame.cpp @@ -251,15 +251,16 @@ VideoWindow::captureFrame() const DEBUG_BLOCK int ratio, format, w, h; - if( !xine_get_current_frame( *engine(), &w, &h, &ratio, &format, NULL ) ) + if (!xine_get_current_frame_s(*engine(), &w, &h, &ratio, &format, nullptr, nullptr)) return TQImage(); - uint8_t *yuv = new uint8_t[((w+8) * (h+1) * 2)]; + int yuv_size = ((w + 8) * (h + 1)) * 2; + uint8_t *yuv = new uint8_t[yuv_size]; if( yuv == 0 ) { Debug::error() << "Not enough memory to make screenframe!\n"; return TQImage(); } - xine_get_current_frame( *engine(), &w, &h, &ratio, &format, yuv ); + xine_get_current_frame_s(*engine(), &w, &h, &ratio, &format, yuv, &yuv_size); // convert to yv12 if necessary uint8_t *y = 0, *u = 0, *v = 0; |