[FFmpeg-cvslog] avopt: fix segfault
Michael Niedermayer
git at videolan.org
Fri May 27 17:04:17 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May 27 16:54:22 2011 +0200| [87ababd7c5adb6d82a3a642b9b6e2223b3a4025b] | committer: Michael Niedermayer
avopt: fix segfault
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87ababd7c5adb6d82a3a642b9b6e2223b3a4025b
---
libavutil/opt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 8f2d9a6..6b2bc77 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -45,7 +45,7 @@ const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mas
const AVOption *av_next_option(void *obj, const AVOption *last)
{
if (last && last[1].name) return ++last;
- else if (last) return NULL;
+ else if (last || !(*(AVClass**)obj)->option->name) return NULL;
else return (*(AVClass**)obj)->option;
}
More information about the ffmpeg-cvslog
mailing list