@@ -904,7 +904,8 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
CFArrayRef data_rate_limits;
int64_t bytes_per_second_value = 0;
int64_t one_second_value = 0;
- void *nums[2];
+ CFNumberRef nums[2];
+ void *numsptr = nums;
int status = VTCompressionSessionCreate(kCFAllocatorDefault,
avctx->width,
@@ -962,7 +963,7 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
nums[0] = bytes_per_second;
nums[1] = one_second;
data_rate_limits = CFArrayCreate(kCFAllocatorDefault,
- nums,
+ numsptr,
2,
&kCFTypeArrayCallBacks);
This email should have the patch. Sorry for the duplicate. When compiled by clang, libavcodec/videotoolboxenc.c produces three 'discards qualifiers' warnings. Changing type of nums[2] from void * to CFNumberRef silences the first two warnings. Adding a pointer (numsptr) to nums[2], and using that in CFArrayCreate silences the third warning. Signed-off-by: Patrick Earnest <patrick@patrickearnest.com> --- libavcodec/videotoolboxenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)