[Android] thumbnailer: use of object after release

Ludovic Fauvet git at videolan.org
Wed Sep 19 21:06:05 CEST 2012


vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Wed Sep 19 18:09:17 2012 +0200| [5b46667b5ff28c6df4b92dec2a3ef0cfbd51f416] | committer: Ludovic Fauvet

thumbnailer: use of object after release

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=5b46667b5ff28c6df4b92dec2a3ef0cfbd51f416
---

 vlc-android/jni/thumbnailer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/jni/thumbnailer.c b/vlc-android/jni/thumbnailer.c
index 16ccb49..0e49fd2 100644
--- a/vlc-android/jni/thumbnailer.c
+++ b/vlc-android/jni/thumbnailer.c
@@ -139,7 +139,6 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
     libvlc_media_add_option( m, ":no-osd" );
 
     libvlc_media_player_set_media(sys->mp, m);
-    libvlc_media_release(m);
 
     /* Get the size of the video with the tracks information of the media. */
     libvlc_media_track_info_t *tracks;
@@ -158,6 +157,7 @@ jbyteArray Java_org_videolan_vlc_LibVLC_getThumbnail(JNIEnv *env, jobject thiz,
         }
 
     free(tracks);
+    libvlc_media_release(m);
 
     /* Abord if we have not found a video track. */
     if (!hasVideoTrack)



More information about the Android mailing list