summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-06 20:40:02 +0200
committerwm4 <wm4@nowhere>2013-06-16 22:05:10 +0200
commit0d5e6084aed34a9e6f48a4a2cfaf095b17acb21b (patch)
tree8513c329707016173c6b482961cf721b81b5bfc7 /stream/stream.c
parent1c35794efd7d025457e527b61f7c23fe375c2f5a (diff)
downloadmpv-0d5e6084aed34a9e6f48a4a2cfaf095b17acb21b.tar.bz2
mpv-0d5e6084aed34a9e6f48a4a2cfaf095b17acb21b.tar.xz
stream: don't set EOF flag in stream implementations
EOF should be set when reading more data fails. The stream implementations have nothing to say here and should behave correctly when trying to read when EOF was actually read. Even when seeking, a correct EOF flag should be guaranteed. stream_seek() (or actually stream_seek_long()) calls stream_fill_buffer() at least once, which also updates the EOF flag.
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/stream/stream.c b/stream/stream.c
index d27b3f5f3f..7dc7bb61ac 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -397,7 +397,6 @@ eof_out:
return 0;
}
// When reading succeeded we are obviously not at eof.
- // This e.g. avoids issues with eof getting stuck when lavf seeks in MPEG-TS
s->eof = 0;
s->pos += len;
stream_capture_write(s, buf, len);
@@ -421,7 +420,6 @@ void stream_unread_buffer(stream_t *s, void *buffer, size_t buffer_size)
memcpy(s->buffer, buffer, buffer_size);
s->buf_pos = 0;
s->buf_len = buffer_size + remainder;
- s->eof = 0;
}
int stream_fill_buffer(stream_t *s)