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
(cherry picked from commit 202e03f)
  • Loading branch information
christosts authored and microkatz committed Nov 23, 2022
1 parent 9b0790e commit a114b0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions/ffmpeg/src/main/jni/ffmpeg_jni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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 @@ -348,9 +348,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 a114b0e

Please sign in to comment.