From fc6efc9a5b55726d30430e1a3bd7002665613c5e Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 30 Sep 2024 15:26:01 +0200 Subject: [PATCH] vcomp/lavc: remove unneeded code The same assignment is later in the get_av_pixfmt_details() call (this is the relict from the times when function was implemented differently - 23ca8f37). --- src/video_compress/libavcodec.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index 97677fdaa..a7039a9a9 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1006,10 +1006,6 @@ static bool try_open_codec(struct state_video_compress_libav *s, } #endif - if (const AVPixFmtDescriptor * desc = av_pix_fmt_desc_get(pix_fmt)) { // defaults - s->codec_ctx->colorspace = (desc->flags & AV_PIX_FMT_FLAG_RGB) != 0U ? AVCOL_SPC_RGB : AVCOL_SPC_BT709; - s->codec_ctx->color_range = (desc->flags & AV_PIX_FMT_FLAG_RGB) != 0U ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; - } get_av_pixfmt_details(pix_fmt, &s->codec_ctx->colorspace, &s->codec_ctx->color_range); /* open it */