1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avoid strcmp NULL, fix segv on mingw

Originally committed as revision 18502 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-04-14 00:12:29 +00:00
parent 1894e741f5
commit de481d7fed

View File

@ -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;
}