summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoravcoder <ffmpeg@gmail.com>2009-03-23 16:43:06 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2009-03-23 16:43:06 +0000
commitfbf1b88589c7d3914ed396011121077412358b5d (patch)
treee17cdf90ea0debec4328cfc7f380ce9f03d09a15
parent6d69a653d8c60c05a2afc540237660fa8db90e71 (diff)
Move declaration of 'pict' closer to where it is used and initialize it.
Patch by avcoder: gmail(ffmpeg) Originally committed as revision 18171 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffplay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 413225e9ce..18422e2822 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1227,7 +1227,6 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts)
{
VideoPicture *vp;
int dst_pix_fmt;
- AVPicture pict;
static struct SwsContext *img_convert_ctx;
/* 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)
/* if the frame is not skipped, then display it */
if (vp->bmp) {
+ AVPicture pict;
+
/* get a pointer on the bitmap */
SDL_LockYUVOverlay (vp->bmp);
dst_pix_fmt = PIX_FMT_YUV420P;
+ memset(&pict,0,sizeof(AVPicture));
pict.data[0] = vp->bmp->pixels[0];
pict.data[1] = vp->bmp->pixels[2];
pict.data[2] = vp->bmp->pixels[1];