changeset 3386:9513f0d1ce0b libavformat

Null pointer check / CID26.
author michael
date Wed, 28 May 2008 01:57:19 +0000
parents 2d7d35d04f9c
children 12b7fc079e64
files yuv4mpeg.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/yuv4mpeg.c	Wed May 28 01:53:23 2008 +0000
+++ b/yuv4mpeg.c	Wed May 28 01:57:19 2008 +0000
@@ -322,6 +322,8 @@
     }
 
     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);