[FFmpeg-cvslog] opt_find: fix segfault

Michael Niedermayer git at videolan.org
Sat Aug 13 01:15:56 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 13 01:04:53 2011 +0200| [7b382ab6b03adbf9642d86fd8a8a54b61b67d836] | committer: Michael Niedermayer

opt_find: fix segfault

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b382ab6b03adbf9642d86fd8a8a54b61b67d836
---

 libavcodec/options.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index d201072..78c2f72 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -45,7 +45,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit, i
     AVCodec        *c = NULL;
 
     if (s->priv_data) {
-        if (s->codec->priv_class)
+        if (s->codec && s->codec->priv_class)
             return av_opt_find(s->priv_data, name, unit, opt_flags, search_flags);
         return NULL;
     }



More information about the ffmpeg-cvslog mailing list