Skip to content

Commit 46e565f

Browse files
committed
Fix some code scan issues.
Signed-off-by: Zhong Li <zhong.li@intel.com>
1 parent aef199e commit 46e565f

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

libavcodec/qsvenc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
12381238
0 : ff_qsv_print_error(avctx, ret, "Error during encoding");
12391239
}
12401240

1241-
if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame->interlaced_frame)
1241+
if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && frame->interlaced_frame)
12421242
print_interlace_msg(avctx, q);
12431243

12441244
if (*sync) {

libavfilter/qsvvpp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
413413
AVHWDeviceContext *device_ctx;
414414
AVQSVDeviceContext *device_hwctx;
415415
mfxHDL handle;
416-
mfxHandleType handle_type;
416+
mfxHandleType handle_type = MFX_HANDLE_D3D9_DEVICE_MANAGER;
417417
mfxVersion ver;
418418
mfxIMPL impl;
419419
int ret, i;

libavfilter/vf_deinterlace_qsv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static int init_out_session(AVFilterContext *ctx)
177177
int opaque = !!(hw_frames_hwctx->frame_type & MFX_MEMTYPE_OPAQUE_FRAME);
178178

179179
mfxHDL handle = NULL;
180-
mfxHandleType handle_type;
180+
mfxHandleType handle_type = MFX_HANDLE_D3D9_DEVICE_MANAGER;
181181
mfxVersion ver;
182182
mfxIMPL impl;
183183
mfxVideoParam par;

libavfilter/vf_overlay_qsv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static int setup_layout(AVFilterContext *ctx)
360360
}
361361
static int have_alpha_planar(AVFilterLink *link)
362362
{
363-
enum AVPixelFormat pix_fmt;
363+
enum AVPixelFormat pix_fmt = link->format;
364364
const AVPixFmtDescriptor *desc;
365365
AVHWFramesContext *fctx;
366366

libavfilter/vf_scale_qsv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int init_out_session(AVFilterContext *ctx)
274274
int opaque = !!(in_frames_hwctx->frame_type & MFX_MEMTYPE_OPAQUE_FRAME);
275275

276276
mfxHDL handle = NULL;
277-
mfxHandleType handle_type;
277+
mfxHandleType handle_type = MFX_HANDLE_D3D9_DEVICE_MANAGER;
278278
mfxVersion ver;
279279
mfxIMPL impl;
280280
mfxVideoParam par;

0 commit comments

Comments
 (0)