diff --git a/src/import/ImportFFmpeg.cpp b/src/import/ImportFFmpeg.cpp index ea69b7085..b365bf3fe 100644 --- a/src/import/ImportFFmpeg.cpp +++ b/src/import/ImportFFmpeg.cpp @@ -765,7 +765,7 @@ int FFmpegImportFileHandle::WriteData(streamContext *sc) case AV_SAMPLE_FMT_S32: case AV_SAMPLE_FMT_S32P: - ((float *)tmp[chn])[index] = (float) *(int32_t *)in * (1.0 / (1 << 31)); + ((float *)tmp[chn])[index] = (float) *(int32_t *)in * (1.0 / (1u << 31)); break; case AV_SAMPLE_FMT_FLT: diff --git a/src/ondemand/ODDecodeFFmpegTask.cpp b/src/ondemand/ODDecodeFFmpegTask.cpp index fa00d9118..a89d7239c 100644 --- a/src/ondemand/ODDecodeFFmpegTask.cpp +++ b/src/ondemand/ODDecodeFFmpegTask.cpp @@ -548,7 +548,7 @@ int ODFFmpegDecoder::FillDataFromCache(samplePtr & data, sampleFormat outFormat, case AV_SAMPLE_FMT_S32: //printf("s32 in %lu out %lu cachelen %lu outLen %lu\n", inIndex, outIndex, mDecodeCache[i]->len, len); - ((float *)outBuf)[outIndex] = (float) ((int32_t*)mDecodeCache[i]->samplePtr)[inIndex] * (1.0 / (1 << 31)); + ((float *)outBuf)[outIndex] = (float) ((int32_t*)mDecodeCache[i]->samplePtr.get())[inIndex] * (1.0 / (1u << 31)); break; case AV_SAMPLE_FMT_FLT: