From dac0e32f9c5bf43fe769bb1d10b13426b4096117 Mon Sep 17 00:00:00 2001 From: Michael Zucchi Date: Tue, 16 Jul 2019 19:25:37 +0930 Subject: [PATCH] Fix non-dlsym resolution. --- src/notzed.jjmpeg/jni/jj-avpacket.c | 4 ++-- src/notzed.jjmpeg/jni/jj-avpacket.def | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/notzed.jjmpeg/jni/jj-avpacket.c b/src/notzed.jjmpeg/jni/jj-avpacket.c index fe2f3e1..90ab16c 100644 --- a/src/notzed.jjmpeg/jni/jj-avpacket.c +++ b/src/notzed.jjmpeg/jni/jj-avpacket.c @@ -86,12 +86,12 @@ JNIEXPORT jobject JNICALL Java_au_notzed_jjmpeg_AVPacket_getData__J AVPacket *packet = NativeZ_getP(env, jpacket); if (packet->size < size) { - if (av_grow_packet(packet, size - packet->size) != 0) { + if (DLCALL(av_grow_packet)(packet, size - packet->size) != 0) { nativez_ThrowOutOfMemoryError(env, "Unable to grow packet"); return NULL; } } else { - av_shrink_packet(packet, size); + DLCALL(av_shrink_packet)(packet, size); } if (nativez_NonNull(env, "No data pointer", packet->data)) diff --git a/src/notzed.jjmpeg/jni/jj-avpacket.def b/src/notzed.jjmpeg/jni/jj-avpacket.def index 92c42ae..f4fd5b9 100644 --- a/src/notzed.jjmpeg/jni/jj-avpacket.def +++ b/src/notzed.jjmpeg/jni/jj-avpacket.def @@ -6,6 +6,8 @@ header avcodec libavcodec/avcodec.h { av_packet_rescale_ts av_init_packet + av_grow_packet + av_shrink_packet } java AVPacket au/notzed/jjmpeg/AVPacket { -- 2.39.5