[FFmpeg-devel] [PATCH] examples/muxing: cast sws_scale() argument to the expected one

Stefano Sabatini stefasab at gmail.com
Tue Aug 21 18:26:00 CEST 2012


Fix warnings:
muxing.c: In function ‘write_video_frame’:
muxing.c:326:23: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [enabled by default]
---
 doc/examples/muxing.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 0c7cdf5..9bcf53f 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -322,7 +322,8 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
                 }
             }
             fill_yuv_image(tmp_picture, frame_count, c->width, c->height);
-            sws_scale(img_convert_ctx, tmp_picture->data, tmp_picture->linesize,
+            sws_scale(img_convert_ctx,
+                      (const uint8_t * const *)tmp_picture->data, tmp_picture->linesize,
                       0, c->height, picture->data, picture->linesize);
         } else {
             fill_yuv_image(picture, frame_count, c->width, c->height);
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list