]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/lavfutils.c
overlay: clear cur_buf on main input link.
[ffmpeg] / libavfilter / lavfutils.c
index 412a05fe749550d3d2f83c3e976085585df46040..70f7e7169aa807c019ef6dd5c37232097accc9b3 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * Copyright 2012 Stefano Sabatini <stefasab gmail com>
+ *
  * This file is part of FFmpeg.
  *
  * FFmpeg is free software; you can redistribute it and/or
@@ -24,7 +26,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
                   const char *filename, void *log_ctx)
 {
     AVInputFormat *iformat = NULL;
-    AVFormatContext *format_ctx;
+    AVFormatContext *format_ctx = NULL;
     AVCodec *codec;
     AVCodecContext *codec_ctx;
     AVFrame *frame;
@@ -80,7 +82,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
         goto end;
     ret = 0;
 
-    av_image_copy(data, linesize, frame->data, frame->linesize, *pix_fmt, *w, *h);
+    av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h);
 
 end:
     if (codec_ctx)