mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
82bed11992
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->data = inputBuffer;
|
||||||
packet->size = inputSize;
|
packet->size = inputSize;
|
||||||
const int ret =
|
const int ret =
|
||||||
decodePacket((AVCodecContext *)context, packet, outputBuffer, outputSize,
|
decodePacket((AVCodecContext *)context, packet, outputBuffer, outputSize);
|
||||||
GrowOutputBufferCallback{env, thiz, decoderOutputBuffer});
|
|
||||||
av_packet_free(&packet);
|
av_packet_free(&packet);
|
||||||
return ret;
|
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) {
|
AUDIO_DECODER_FUNC(jint, ffmpegGetChannelCount, jlong context) {
|
||||||
if (!context) {
|
if (!context) {
|
||||||
LOGE("Context must be non-NULL.");
|
LOGE("Context must be non-NULL.");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue