summaryrefslogtreecommitdiffstats
path: root/src/jogl/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/native')
-rw-r--r--src/jogl/native/libav/ffmpeg_impl_template.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jogl/native/libav/ffmpeg_impl_template.c b/src/jogl/native/libav/ffmpeg_impl_template.c
index 34a2baeb7..24fddd2c0 100644
--- a/src/jogl/native/libav/ffmpeg_impl_template.c
+++ b/src/jogl/native/libav/ffmpeg_impl_template.c
@@ -1275,6 +1275,7 @@ JNIEXPORT jint JNICALL FF_FUNC(readNextPacket0)
pNIOBufferCurrent->nioRef = (*env)->NewGlobalRef(env, jSampleData);
pNIOBufferCurrent->origPtr = data_ptr;
pNIOBufferCurrent->size = data_size;
+ (*env)->DeleteLocalRef(env, jSampleData);
if(pAV->verbose) {
fprintf(stderr, "A NIO: Alloc ptr %p / ref %p, %d bytes\n",
pNIOBufferCurrent->origPtr, pNIOBufferCurrent->nioRef, pNIOBufferCurrent->size);