From 60ddd2922aabe6704e0baa135ca54e9111782b7c Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Wed, 31 Dec 2008 22:57:02 +0100 Subject: handle read errors when demuxing mpeg data Some input plugins (e.g. file) return negative error codes from read, this should be treated as no (more) data available. --- src/demuxers/demux_mpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 388be2140..4be2bfc50 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -920,7 +920,7 @@ static void demux_mpeg_resync (demux_mpeg_t *this, uint32_t buf) { if (pos == len) { len = this->input->read(this->input, dummy_buf, sizeof(dummy_buf)); pos = 0; - if (len == 0) { + if (len <= 0) { this->status = DEMUX_FINISHED; break; } -- cgit v1.2.3