comparison libmpdemux/demux_y4m.c @ 15817:cce2717344f4

10l
author faust3
date Sun, 26 Jun 2005 15:15:38 +0000
parents 74968e3440ff
children 6b86089c2edd
comparison
equal deleted inserted replaced
15816:5aa87072ef31 15817:cce2717344f4
28 char buf[10]; 28 char buf[10];
29 y4m_priv_t* priv; 29 y4m_priv_t* priv;
30 30
31 mp_msg(MSGT_DEMUX, MSGL_V, "Checking for YUV4MPEG2\n"); 31 mp_msg(MSGT_DEMUX, MSGL_V, "Checking for YUV4MPEG2\n");
32 32
33 stream_read(demuxer->stream, buf, 9); 33 if(stream_read(demuxer->stream, buf, 9)!=9)
34 return 0;
35
34 buf[9] = 0; 36 buf[9] = 0;
35 37
36 if (strncmp("YUV4MPEG2", buf, 9) && strncmp("YUV4MPEG ", buf, 9)) { 38 if (strncmp("YUV4MPEG2", buf, 9) && strncmp("YUV4MPEG ", buf, 9)) {
37 return 0; 39 return 0;
38 } 40 }