changeset 15817:cce2717344f4

10l
author faust3
date Sun, 26 Jun 2005 15:15:38 +0000
parents 5aa87072ef31
children c1eb194d56e0
files libmpdemux/demux_nuv.c libmpdemux/demux_y4m.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_nuv.c	Sat Jun 25 18:33:44 2005 +0000
+++ b/libmpdemux/demux_nuv.c	Sun Jun 26 15:15:38 2005 +0000
@@ -301,7 +301,8 @@
 
 	mp_msg ( MSGT_DEMUX, MSGL_V, "Checking for NuppelVideo\n" );
 
-	stream_read(demuxer->stream,(char*)&ns,sizeof(ns));
+	if(stream_read(demuxer->stream,(char*)&ns,sizeof(ns)) != sizeof(ns))
+		return 0;
 
 	if ( strncmp ( ns.finfo, "NuppelVideo", 12 ) ) 
 		return 0; /* Not a NuppelVideo file */
--- a/libmpdemux/demux_y4m.c	Sat Jun 25 18:33:44 2005 +0000
+++ b/libmpdemux/demux_y4m.c	Sun Jun 26 15:15:38 2005 +0000
@@ -30,7 +30,9 @@
     
     mp_msg(MSGT_DEMUX, MSGL_V, "Checking for YUV4MPEG2\n");
     
-    stream_read(demuxer->stream, buf, 9);
+    if(stream_read(demuxer->stream, buf, 9)!=9)
+        return 0;
+
     buf[9] = 0;
     
     if (strncmp("YUV4MPEG2", buf, 9) && strncmp("YUV4MPEG ", buf, 9)) {