Skip to content

Commit

Permalink
vcomp/lavc: remove unneeded code
Browse files Browse the repository at this point in the history
The same assignment is later in the get_av_pixfmt_details() call (this
is the relict from the times when function was implemented differently
- 23ca8f3).
  • Loading branch information
MartinPulec committed Sep 30, 2024
1 parent bdce8d7 commit fc6efc9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/video_compress/libavcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit fc6efc9

Please sign in to comment.