VideoState::queue_picture: ffmpeg expects a buffer of 4 pointers in sws_scale

pull/1602/head
Ilya Zhuravlev 7 years ago
parent 8d44d3124e
commit b4ec8aaf5e

@ -315,9 +315,9 @@ int VideoState::queue_picture(AVFrame *pFrame, double pts)
vp->pts = pts; vp->pts = pts;
vp->data.resize((*this->video_st)->codec->width * (*this->video_st)->codec->height * 4); 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, 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 // now we inform our display thread that we have a pic ready
this->pictq_windex = (this->pictq_windex+1) % VIDEO_PICTURE_ARRAY_SIZE; this->pictq_windex = (this->pictq_windex+1) % VIDEO_PICTURE_ARRAY_SIZE;

Loading…
Cancel
Save