From b4ec8aaf5ef3bb5f344a6a8886124a6d2d0fba28 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sun, 21 Jan 2018 12:21:22 -0500 Subject: [PATCH] VideoState::queue_picture: ffmpeg expects a buffer of 4 pointers in sws_scale --- extern/osg-ffmpeg-videoplayer/videostate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extern/osg-ffmpeg-videoplayer/videostate.cpp b/extern/osg-ffmpeg-videoplayer/videostate.cpp index 9fd209d56..35bfca4aa 100644 --- a/extern/osg-ffmpeg-videoplayer/videostate.cpp +++ b/extern/osg-ffmpeg-videoplayer/videostate.cpp @@ -315,9 +315,9 @@ int VideoState::queue_picture(AVFrame *pFrame, double pts) vp->pts = pts; vp->data.resize((*this->video_st)->codec->width * (*this->video_st)->codec->height * 4); - uint8_t *dst = &vp->data[0]; + uint8_t *dst[4] = { &vp->data[0], nullptr, nullptr, nullptr }; sws_scale(this->sws_context, pFrame->data, pFrame->linesize, - 0, (*this->video_st)->codec->height, &dst, this->rgbaFrame->linesize); + 0, (*this->video_st)->codec->height, dst, this->rgbaFrame->linesize); // now we inform our display thread that we have a pic ready this->pictq_windex = (this->pictq_windex+1) % VIDEO_PICTURE_ARRAY_SIZE;