[FFmpeg-devel] [PATCH] avcodec/videotoolbox: fix -Wunused-but-set-variable

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sat Sep 19 21:58:33 CEST 2015


pix_fmt was declared presumably to shorten the argument passed to the function.
However, it is currently not being used for such a purpose.
This patch makes it used for that purpose.
This fixes -Wunused-but-set-variable reported at e.g:
http://fate.ffmpeg.org/log.cgi?time=20150919194249&log=compile&slot=x86_64-darwin-gcc-4.9.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavcodec/videotoolbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index b78238a..e35eb2d 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -546,7 +546,7 @@ static int videotoolbox_default_init(AVCodecContext *avctx)
 
     buf_attr = videotoolbox_buffer_attributes_create(avctx->width,
                                                      avctx->height,
-                                                     videotoolbox->cv_pix_fmt_type);
+                                                     pix_fmt);
 
     decoder_cb.decompressionOutputCallback = videotoolbox_decoder_callback;
     decoder_cb.decompressionOutputRefCon   = avctx;
-- 
2.5.2



More information about the ffmpeg-devel mailing list