doc/examples/output: Cast pointer to the right (const) type
authorDiego Biurrun <diego@biurrun.de>
Sat, 22 Apr 2017 11:19:04 +0000 (13:19 +0200)
committerDiego Biurrun <diego@biurrun.de>
Mon, 24 Apr 2017 14:10:06 +0000 (16:10 +0200)
doc/examples/output.c:512:33: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type

doc/examples/output.c

index bb0da30..59e7b95 100644 (file)
@@ -509,8 +509,9 @@ static AVFrame *get_video_frame(OutputStream *ost)
             }
         }
         fill_yuv_image(ost->tmp_frame, ost->next_pts, c->width, c->height);
-        sws_scale(ost->sws_ctx, ost->tmp_frame->data, ost->tmp_frame->linesize,
-                  0, c->height, ost->frame->data, ost->frame->linesize);
+        sws_scale(ost->sws_ctx, (const uint8_t * const *) ost->tmp_frame->data,
+                  ost->tmp_frame->linesize, 0, c->height, ost->frame->data,
+                  ost->frame->linesize);
     } else {
         fill_yuv_image(ost->frame, ost->next_pts, c->width, c->height);
     }