fix crash on streams with frame tags, patch by Brett Kosinski <brettk@frodo.dyn.gno.org>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9655 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2003-03-22 19:50:10 +00:00
parent bdee49a645
commit c67632e7f5
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,6 @@ int y4m_check_file(demuxer_t* demuxer){
buf[9] = 0;
if (strncmp("YUV4MPEG2", buf, 9) && strncmp("YUV4MPEG ", buf, 9)) {
mp_msg(MSGT_DEMUX, MSGL_DBG2, "Failed: YUV4MPEG2\n");
return 0;
}
@ -68,6 +67,8 @@ int demux_y4m_fill_buffer(demuxer_t *demux) {
unsigned char *buf[3];
int err, size;
y4m_init_frame_info(&fi);
demux->filepos=stream_tell(demux->stream);
size = ((sh_video_t*)ds->sh)->disp_w*((sh_video_t*)ds->sh)->disp_h;