[FFmpeg-cvslog] avutil/film_grain_params: initialize VCS to UNSPECIFIED
Niklas Haas
git at videolan.org
Sat Mar 23 20:08:55 EET 2024
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Mon Mar 18 16:58:30 2024 +0100| [a08f358769928709b9dfb1daa641d8372a1a9fd3] | committer: Niklas Haas
avutil/film_grain_params: initialize VCS to UNSPECIFIED
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a08f358769928709b9dfb1daa641d8372a1a9fd3
---
libavutil/film_grain_params.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/libavutil/film_grain_params.c b/libavutil/film_grain_params.c
index 930d23c7fe..230ce8d701 100644
--- a/libavutil/film_grain_params.c
+++ b/libavutil/film_grain_params.c
@@ -30,13 +30,20 @@ AVFilmGrainParams *av_film_grain_params_alloc(size_t *size)
AVFilmGrainParams *av_film_grain_params_create_side_data(AVFrame *frame)
{
+ AVFilmGrainParams *fgp;
AVFrameSideData *side_data = av_frame_new_side_data(frame,
AV_FRAME_DATA_FILM_GRAIN_PARAMS,
sizeof(AVFilmGrainParams));
if (!side_data)
return NULL;
- memset(side_data->data, 0, sizeof(AVFilmGrainParams));
+ fgp = (AVFilmGrainParams *) side_data->data;
+ *fgp = (AVFilmGrainParams) {
+ .color_range = AVCOL_RANGE_UNSPECIFIED,
+ .color_primaries = AVCOL_PRI_UNSPECIFIED,
+ .color_trc = AVCOL_TRC_UNSPECIFIED,
+ .color_space = AVCOL_SPC_UNSPECIFIED,
+ };
- return (AVFilmGrainParams *)side_data->data;
+ return fgp;
}
More information about the ffmpeg-cvslog
mailing list