hwcontext: initialize sw_format in av_hwframe_ctx_alloc()
authorAnton Khirnov <anton@khirnov.net>
Fri, 15 Apr 2016 08:15:54 +0000 (10:15 +0200)
committerAnton Khirnov <anton@khirnov.net>
Fri, 15 Apr 2016 08:15:54 +0000 (10:15 +0200)
libavutil/hwcontext.c

index ac1e2c9..9ffc718 100644 (file)
@@ -209,6 +209,7 @@ AVBufferRef *av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
     ctx->device_ref = device_ref;
     ctx->device_ctx = device_ctx;
     ctx->format     = AV_PIX_FMT_NONE;
+    ctx->sw_format  = AV_PIX_FMT_NONE;
 
     ctx->internal->hw_type = hw_type;