From de481d7fed90465ffc5303dd15791c3722aff23a Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Tue, 14 Apr 2009 00:12:29 +0000 Subject: [PATCH] avoid strcmp NULL, fix segv on mingw Originally committed as revision 18502 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/imgconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index ffc0f08e95..46b4cbb5e9 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -494,7 +494,7 @@ static enum PixelFormat avcodec_get_pix_fmt_internal(const char *name) int i; for (i=0; i < PIX_FMT_NB; i++) - if (!strcmp(pix_fmt_info[i].name, name)) + if (pix_fmt_info[i].name && !strcmp(pix_fmt_info[i].name, name)) return i; return PIX_FMT_NONE; }