Commit 8766b954 authored by benoit's avatar benoit

Move declaration of 'pict' closer to where it is used and initialize it.

Patch by avcoder: gmail(ffmpeg)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18171 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d35c8e1d
...@@ -1227,7 +1227,6 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts) ...@@ -1227,7 +1227,6 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts)
{ {
VideoPicture *vp; VideoPicture *vp;
int dst_pix_fmt; int dst_pix_fmt;
AVPicture pict;
static struct SwsContext *img_convert_ctx; static struct SwsContext *img_convert_ctx;
/* wait until we have space to put a new picture */ /* wait until we have space to put a new picture */
...@@ -1270,10 +1269,13 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts) ...@@ -1270,10 +1269,13 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts)
/* if the frame is not skipped, then display it */ /* if the frame is not skipped, then display it */
if (vp->bmp) { if (vp->bmp) {
AVPicture pict;
/* get a pointer on the bitmap */ /* get a pointer on the bitmap */
SDL_LockYUVOverlay (vp->bmp); SDL_LockYUVOverlay (vp->bmp);
dst_pix_fmt = PIX_FMT_YUV420P; dst_pix_fmt = PIX_FMT_YUV420P;
memset(&pict,0,sizeof(AVPicture));
pict.data[0] = vp->bmp->pixels[0]; pict.data[0] = vp->bmp->pixels[0];
pict.data[1] = vp->bmp->pixels[2]; pict.data[1] = vp->bmp->pixels[2];
pict.data[2] = vp->bmp->pixels[1]; pict.data[2] = vp->bmp->pixels[1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment