Skip to content

Commit

Permalink
Fix compilation error in ffmpeg JNI layer
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 490263003
  • Loading branch information
christosts authored and microkatz committed Nov 22, 2022
1 parent 779b042 commit a9be38a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/decoder_ffmpeg/src/main/jni/ffmpeg_jni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int decodePacket(AVCodecContext *context, AVPacket *packet,
/**
* Transforms ffmpeg AVERROR into a negative AUDIO_DECODER_ERROR constant value.
*/
int transformError(const char *functionName, int errorNumber);
int transformError(int errorNumber);

/**
* Outputs a log message describing the avcodec error number.
Expand Down Expand Up @@ -349,9 +349,9 @@ int decodePacket(AVCodecContext *context, AVPacket *packet,
return outSize;
}

int transformError(int result) {
return result == AVERROR_INVALIDDATA ? AUDIO_DECODER_ERROR_INVALID_DATA
: AUDIO_DECODER_ERROR_OTHER;
int transformError(int errorNumber) {
return errorNumber == AVERROR_INVALIDDATA ? AUDIO_DECODER_ERROR_INVALID_DATA
: AUDIO_DECODER_ERROR_OTHER;
}

void logError(const char *functionName, int errorNumber) {
Expand Down

0 comments on commit a9be38a

Please sign in to comment.