[MPlayer-dev-eng] [PATCH] Fix incorrect API usage for FFmpeg

Brad Smith brad at comstyle.com
Thu Jan 12 17:54:13 EET 2023


Building with Clang 15 it has kicked up an error exposing what appears
to be incorrect API usage for FFmpeg.


libmpcodecs/ve_lavc.c:444:39: error: incompatible integer to pointer conversion assigning to 'RcOverride *' (aka 'struct RcOverride *') from 'int' [-Wint-conversion]
        lavc_venc_context->rc_override=
                                      ^

Patch from Jeremie Courreges-Anglas <jca at wxcvbn.org>


Index: libmpcodecs/ve_lavc.c
===================================================================
--- libmpcodecs/ve_lavc.c	(revision 38408)
+++ libmpcodecs/ve_lavc.c	(working copy)
@@ -442,7 +442,7 @@
             return 0;
         }
         lavc_venc_context->rc_override=
-            av_reallocp_array(lavc_venc_context->rc_override, i+1, sizeof(*lavc_venc_context->rc_override));
+            av_realloc_array(lavc_venc_context->rc_override, i+1, sizeof(*lavc_venc_context->rc_override));
         lavc_venc_context->rc_override[i].start_frame= start;
         lavc_venc_context->rc_override[i].end_frame  = end;
         if(q>0){


More information about the MPlayer-dev-eng mailing list