[FFmpeg-devel] [PATCH] ffplay: remove unused dst_pix_fmt variable in queue_picture()

Stefano Sabatini stefano.sabatini-lala at poste.it
Mon Apr 11 11:13:49 CEST 2011


Simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala at poste.it>
---
 ffplay.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 8ab05a9..b4df7c4 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1362,7 +1362,7 @@ static void alloc_picture(void *opaque)
 static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t pos)
 {
     VideoPicture *vp;
-    int dst_pix_fmt;
+
     /* wait until we have space to put a new picture */
     SDL_LockMutex(is->pictq_mutex);
 
@@ -1422,7 +1422,6 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
         /* 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];
@@ -1440,7 +1439,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
         sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
         is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx,
             vp->width, vp->height, vp->pix_fmt, vp->width, vp->height,
-            dst_pix_fmt, sws_flags, NULL, NULL, NULL);
+            PIX_FMT_YUV_420P, sws_flags, NULL, NULL, NULL);
         if (is->img_convert_ctx == NULL) {
             fprintf(stderr, "Cannot initialize the conversion context\n");
             exit(1);
-- 
1.7.2.3



More information about the ffmpeg-devel mailing list