changeset 20432:972c93990379

add two missing checks - PATCH by Karolina Lindqvist AT kramnet-se
author reynaldo
date Wed, 25 Oct 2006 20:39:01 +0000
parents 47aaa59c0e18
children a0bac6e6a6d1
files libmpdemux/demux_rawdv.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rawdv.c	Wed Oct 25 20:36:36 2006 +0000
+++ b/libmpdemux/demux_rawdv.c	Wed Oct 25 20:39:01 2006 +0000
@@ -146,10 +146,13 @@
    dv_decoder=dv_decoder_new(TRUE,TRUE,FALSE);
    dv_decoder->quality=DV_QUALITY_BEST;
 
-   dv_parse_header(dv_decoder, dv_frame);
+   if (dv_parse_header(dv_decoder, dv_frame) == -1)
+	   return NULL;
 
    // create a new video stream header
    sh_video = new_sh_video(demuxer, 0);
+   if (!sh_video)
+	   return NULL;
 
    // make sure the demuxer knows about the new video stream header
    // (even though new_sh_video() ought to take care of it)