libx265: Fix use of uninitialized input picture
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Thu, 13 Feb 2014 20:49:05 +0000 (20:49 +0000)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Fri, 14 Feb 2014 14:27:45 +0000 (14:27 +0000)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavcodec/libx265.c

index e63e0cb..05ed143 100644 (file)
@@ -182,6 +182,8 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     int ret;
     int i;
 
+    x265_picture_init(ctx->params, &x265pic);
+
     if (pic) {
         for (i = 0; i < 3; i++) {
            x265pic.planes[i] = pic->data[i];