[FFmpeg-devel] [PATCH 2/7] lavc/options: properly init AVCodecContext.colorspace
Niklas Haas
ffmpeg at haasn.xyz
Wed Oct 11 17:55:36 EEST 2023
From: Niklas Haas <git at haasn.dev>
This currently defaults to AVCOL_SPC_RGB, but it should properly default
to AVCOL_SPC_UNSPECIFIED, following the logic of the other fields.
---
libavcodec/options.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/options.c b/libavcodec/options.c
index a9b35ee1c3..c39218d7fb 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -123,6 +123,7 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec)
s->pix_fmt = AV_PIX_FMT_NONE;
s->sw_pix_fmt = AV_PIX_FMT_NONE;
s->sample_fmt = AV_SAMPLE_FMT_NONE;
+ s->colorspace = AVCOL_SPC_UNSPECIFIED;
#if FF_API_REORDERED_OPAQUE
FF_DISABLE_DEPRECATION_WARNINGS
--
2.42.0
More information about the ffmpeg-devel
mailing list