diff options
Diffstat (limited to 'libmpdemux/demux_y4m.c')
-rw-r--r-- | libmpdemux/demux_y4m.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libmpdemux/demux_y4m.c b/libmpdemux/demux_y4m.c index 5064a07ed7..90a62b3891 100644 --- a/libmpdemux/demux_y4m.c +++ b/libmpdemux/demux_y4m.c @@ -29,10 +29,9 @@ #include "config.h" #include "mp_msg.h" -#include "help_mp.h" #include "yuv4mpeg.h" -//#include "stream/stream.h" +#include "stream/stream.h" #include "demuxer.h" #include "stheader.h" @@ -90,11 +89,14 @@ static int demux_y4m_fill_buffer(demuxer_t *demux, demux_stream_t *dsds) { int err, size; int nextc; - nextc = stream_read_char(demux->stream); - stream_skip(demux->stream, -1); - if (nextc == 'Y') { - read_streaminfo(demux); - demux->seekable = 0; + // Concatenated stream check; only done if seekable so skip(-1) works + if (demux->stream->flags & MP_STREAM_SEEK_BW) { + nextc = stream_read_char(demux->stream); + stream_skip(demux->stream, -1); + if (nextc == 'Y') { + read_streaminfo(demux); + demux->seekable = 0; + } } y4m_init_frame_info(&fi); |