summaryrefslogtreecommitdiff
path: root/libavformat/yuv4mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-05-28 01:57:19 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-05-28 01:57:19 +0000
commit884d53855d2b13fcc9ceca4d91059e81cd83ad3d (patch)
tree52c7f3a5e03f627a2049ce7327972b6e9f41c924 /libavformat/yuv4mpeg.c
parentc192426fd87326dd572999f6b483b1f6e02a3e33 (diff)
Null pointer check / CID26.
Originally committed as revision 13488 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/yuv4mpeg.c')
-rw-r--r--libavformat/yuv4mpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 6f1eb5d6e6..d05d8f6514 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -322,6 +322,8 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
st = av_new_stream(s, 0);
+ if(!st)
+ return -1;
st->codec->width = width;
st->codec->height = height;
av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1);