aws-samples / amazon-kinesis-video-streams-producer-embedded-c

Light-wight Amazon Kinesis Video Streams Producer SDK For FreeRTOS/Embedded Linux
Apache License 2.0
27 stars 17 forks source link

mkv: fix incompatible-pointer-types between Mkv_generatePcmCodecPrivateData and AudioTrackInfo_t.uCodecPrivateLen #55

Closed codingspirit closed 2 years ago

codingspirit commented 2 years ago

Mkv_generatePcmCodecPrivateData is taking size_t* but AudioTrackInfo_t.uCodecPrivateLen is uint32_t, which will cause following build warning in newer gcc:

warning: passing argument 5 of 'Mkv_generatePcmCodecPrivateData' from incompatible pointer type [-Wincompatible-pointer-types]
  353 |         Mkv_generatePcmCodecPrivateData(AUDIO_CODEC_OBJECT_TYPE, audioTrackInfo.uFrequency, audioTrackInfo.uChannelNumber, &audioTrackInfo.pCodecPrivate, &audioTrackInfo.uCodecPrivateLen);
      |                                                                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                                           |
      |                                                                                                                                                           uint32_t * {aka unsigned int *}

Signed-off-by: zhiqinli@amazon.com zhiqinli@amazon.com

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.