ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Wed Mar 12 18:59:05 2025 +0100| [44ed8f61d7aa1345d7bd3dad8b5fbf547432fe48] | 
committer: Andreas Rheinhardt

avcodec/aom_film_grain: Cast const away to suppress compiler warning

av_frame_side_data_add() typically takes ownership of
the provided AVBufferRef reference and therefore
uses a parameter of type AVBufferRef**; yet with
the AV_FRAME_SIDE_DATA_FLAG_NEW_REF, it creates
new references instead, without touching the given
reference. Therefore it is safe to cast const away.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=44ed8f61d7aa1345d7bd3dad8b5fbf547432fe48
---

 libavcodec/aom_film_grain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aom_film_grain.c b/libavcodec/aom_film_grain.c
index d5ea75f61c..0f24a2bcf8 100644
--- a/libavcodec/aom_film_grain.c
+++ b/libavcodec/aom_film_grain.c
@@ -366,7 +366,8 @@ int ff_aom_attach_film_grain_sets(const 
AVFilmGrainAFGS1Params *s, AVFrame *fram
             continue;
 
         if (!av_frame_side_data_add(&frame->side_data, &frame->nb_side_data,
-                                    AV_FRAME_DATA_FILM_GRAIN_PARAMS, 
&s->sets[i],
+                                    AV_FRAME_DATA_FILM_GRAIN_PARAMS,
+                                    (AVBufferRef**)&s->sets[i],
                                     AV_FRAME_SIDE_DATA_FLAG_NEW_REF))
             return AVERROR(ENOMEM);
     }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to