From: Michael Zucchi Date: Tue, 16 Jul 2019 09:55:37 +0000 (+0930) Subject: Fix non-dlsym resolution. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=dac0e32f9c5bf43fe769bb1d10b13426b4096117;p=jjmpeg Fix non-dlsym resolution. --- 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 {