From fc8f42b45002b0b361b40394a7f1407b71012954 Mon Sep 17 00:00:00 2001 From: Xiao Date: Thu, 17 Mar 2016 13:32:26 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现象: 点击filter按钮,程序crash 原因: 指针没有向后移动,导致读取filter信息过程进入死循环。最终导致申请的缓冲区溢出,应用crash。 --- .../jni/simplest_ffmpeg_helloworld.c | 1 + 1 file changed, 1 insertion(+) diff --git a/simplest_ffmpeg_android_helloworld/jni/simplest_ffmpeg_helloworld.c b/simplest_ffmpeg_android_helloworld/jni/simplest_ffmpeg_helloworld.c index 12e1475..7bb7d63 100644 --- a/simplest_ffmpeg_android_helloworld/jni/simplest_ffmpeg_helloworld.c +++ b/simplest_ffmpeg_android_helloworld/jni/simplest_ffmpeg_helloworld.c @@ -147,6 +147,7 @@ JNIEXPORT jstring Java_com_leixiaohua1020_sffmpegandroidhelloworld_MainActivity_ AVFilter *f_temp = (AVFilter *)avfilter_next(NULL); while (f_temp != NULL){ sprintf(info, "%s[%10s]\n", info, f_temp->name); + f_temp = f_temp->next; } //LOGE("%s", info);