Skip to content

Commit

Permalink
Fix merge error with ffmpeg_jni.cc
Browse files Browse the repository at this point in the history
Fix merge error with ffmpeg_jni.cc where cherry-pick process included code from nonselected commit.
  • Loading branch information
microkatz authored Jan 17, 2024
1 parent 0ae7a6b commit b930b40
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions libraries/decoder_ffmpeg/src/main/jni/ffmpeg_jni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,11 @@ AUDIO_DECODER_FUNC(jint, ffmpegDecode, jlong context, jobject inputData,
packet->data = inputBuffer;
packet->size = inputSize;
const int ret =
decodePacket((AVCodecContext *)context, packet, outputBuffer, outputSize,
GrowOutputBufferCallback{env, thiz, decoderOutputBuffer});
decodePacket((AVCodecContext *)context, packet, outputBuffer, outputSize);
av_packet_free(&packet);
return ret;
}

uint8_t *GrowOutputBufferCallback::operator()(int requiredSize) const {
jobject newOutputData = env->CallObjectMethod(
thiz, growOutputBufferMethod, decoderOutputBuffer, requiredSize);
if (env->ExceptionCheck()) {
LOGE("growOutputBuffer() failed");
env->ExceptionDescribe();
return nullptr;
}
return static_cast<uint8_t *>(env->GetDirectBufferAddress(newOutputData));
>>>>>>> 45b51d8c97 (Merge pull request #707 from equeim:ffmpeg-6.0)
}

AUDIO_DECODER_FUNC(jint, ffmpegGetChannelCount, jlong context) {
if (!context) {
LOGE("Context must be non-NULL.");
Expand Down

0 comments on commit b930b40

Please sign in to comment.