From 2a73855c052eda4386ebf4f519c407871dffde10 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 10 Oct 2023 08:16:09 +0200 Subject: [PATCH] fixed new Coverity issues fixes CID 41741{7,8} --- src/libavcodec/lavc_common.c | 2 +- src/video_codec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libavcodec/lavc_common.c b/src/libavcodec/lavc_common.c index 143bba436..18259d771 100644 --- a/src/libavcodec/lavc_common.c +++ b/src/libavcodec/lavc_common.c @@ -228,7 +228,7 @@ int av_pixfmt_get_subsampling(enum AVPixelFormat fmt) { } struct pixfmt_desc av_pixfmt_get_desc(enum AVPixelFormat pixfmt) { - struct pixfmt_desc ret; + struct pixfmt_desc ret = { 0 }; const struct AVPixFmtDescriptor *avd = av_pix_fmt_desc_get(pixfmt); ret.depth = avd->comp[0].depth; ret.rgb = avd->flags & AV_PIX_FMT_FLAG_RGB; diff --git a/src/video_codec.c b/src/video_codec.c index c2931c425..0b47c59d3 100644 --- a/src/video_codec.c +++ b/src/video_codec.c @@ -1014,7 +1014,7 @@ void i444_8_to_uyvy(int width, int height, const char *in, char *out) struct pixfmt_desc get_pixfmt_desc(codec_t pixfmt) { - struct pixfmt_desc ret; + struct pixfmt_desc ret = { 0 }; ret.depth = codec_info[pixfmt].bits_per_channel; ret.subsampling = codec_info[pixfmt].subsampling; ret.rgb = codec_info[pixfmt].rgb;