去除非第三方库的编译告警

This commit is contained in:
hejilin
2021-09-16 16:00:46 +08:00
parent 0514278ce6
commit dcb775c6e8
5 changed files with 16 additions and 18 deletions

View File

@@ -83,7 +83,7 @@ int AudioSRC::getPCMData(char *buf, int size) {
if (_audio_cvt.len_cvt) {
_target_buf.append(_buf.get(), _audio_cvt.len_cvt);
}
if (_target_buf.size() < size) {
if (_target_buf.size() < (size_t)size) {
return 0;
}
memcpy(buf, _target_buf.data(), size);
@@ -122,7 +122,7 @@ int AudioPlayer::getPCMChannel() {
int AudioPlayer::getPCMData(char *buf, int size) {
lock_guard<mutex> lck(_mtx);
if (_buffer.size() < size) {
if (_buffer.size() < (size_t)size) {
return 0;
}
memcpy(buf, _buffer.data(), size);

View File

@@ -102,7 +102,7 @@ FFmpegSwr::~FFmpegSwr() {
FFmpegFrame::Ptr FFmpegSwr::inputFrame(const FFmpegFrame::Ptr &frame) {
if (frame->get()->format == _target_format &&
frame->get()->channels == _target_channels &&
frame->get()->channel_layout == _target_channel_layout &&
frame->get()->channel_layout == (uint64_t)_target_channel_layout &&
frame->get()->sample_rate == _target_samplerate) {
//不转格式
return frame;