1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 14:13:32 +02:00

Commit a warnings removal patch from Benjamin Drung to correct a string of minor misdemeanors.

This commit is contained in:
richardash1981
2011-02-07 20:24:04 +00:00
parent 22b64149de
commit 2a7c7de30d
13 changed files with 37 additions and 30 deletions

View File

@@ -867,7 +867,7 @@ int FFmpegImportFileHandle::WriteData(streamContext *sc)
// Try to update the progress indicator (and see if user wants to cancel)
int updateResult = eProgressSuccess;
// PTS (presentation time) is the proper way of getting current position
if (sc->m_pkt.pts != AV_NOPTS_VALUE && mFormatContext->duration != AV_NOPTS_VALUE)
if (sc->m_pkt.pts != int64_t(AV_NOPTS_VALUE) && mFormatContext->duration != int64_t(AV_NOPTS_VALUE))
{
mProgressPos = sc->m_pkt.pts * sc->m_stream->time_base.num / sc->m_stream->time_base.den;
mProgressLen = (mFormatContext->duration > 0 ? mFormatContext->duration / AV_TIME_BASE: 1);

View File

@@ -1043,14 +1043,15 @@ int RawAudioGuess(const wxString &in_fname,
int *out_offset, int *out_channels)
{
const int numTests = 11;
int headerSkipSize = 64;
int dataSize = 16384;
size_t headerSkipSize = 64;
size_t dataSize = 16384;
int format = SF_FORMAT_RAW;
FILE *inf;
int fileLen;
size_t fileLen;
char *rawData[numTests];
int test;
size_t read_data;
#if RAW_GUESS_DEBUG
FILE *af = fopen("raw.txt", "a");
g_raw_debug_file = af;
@@ -1096,7 +1097,10 @@ int RawAudioGuess(const wxString &in_fname,
startPoint = (startPoint/16)*16;
fseek(inf, headerSkipSize + startPoint, SEEK_SET);
fread(rawData[test], 1, dataSize, inf);
read_data = fread(rawData[test], 1, dataSize, inf);
if (read_data != dataSize && ferror(inf)) {
perror("fread error in RawAudioGuess");
}
}
in_wxFFile.Close();