[Mplayer-cvslog] CVS: main/libmpdemux demux_y4m.c,1.2,1.3

Alex Beregszaszi alex at mplayer.dev.hu
Thu Dec 27 12:39:49 CET 2001


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv1654

Modified Files:
	demux_y4m.c 
Log Message:
fixed YUV4MPEG frame reader

Index: demux_y4m.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_y4m.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- demux_y4m.c	27 Dec 2001 11:30:07 -0000	1.2
+++ demux_y4m.c	27 Dec 2001 11:39:47 -0000	1.3
@@ -81,7 +81,17 @@
 
   if (priv->is_older)
   {
-    stream_skip(demux->stream, 6); /* FRAME\n */
+    int c;
+    
+    c = stream_read_char(demux->stream); /* F */
+    if (c == -256)
+	return 0; /* EOF */
+    if (c != 'F')
+    {
+	printf("Bad frame at %p\n", stream_tell(demux->stream)-1);
+	return 0;
+    }
+    stream_skip(demux->stream, 5); /* RAME\n */
     stream_read(demux->stream, buf[0], size);
     stream_read(demux->stream, buf[1], size/4);
     stream_read(demux->stream, buf[2], size/4);




More information about the MPlayer-cvslog mailing list