mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Fix merge error with ffmpeg_jni.cc
Fix merge error with ffmpeg_jni.cc where cherry-pick process included code from nonselected commit.
This commit is contained in:
parent
0ae7a6bd60
commit
b930b40a16
1 changed files with 1 additions and 14 deletions
|
|
@ -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.");
|
||||
|
|
|
|||
Loading…
Reference in a new issue