diff options
author | wm4 <wm4@nowhere> | 2013-06-06 20:39:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-16 22:05:09 +0200 |
commit | 1c35794efd7d025457e527b61f7c23fe375c2f5a (patch) | |
tree | f9c38b117b3b3e05ee8db67310762b42c4de17ab /sub | |
parent | 7fefad7a8f2e45fcab60b400a63c43097ad6c681 (diff) | |
download | mpv-1c35794efd7d025457e527b61f7c23fe375c2f5a.tar.bz2 mpv-1c35794efd7d025457e527b61f7c23fe375c2f5a.tar.xz |
stream: remove stream_reset()
This function was called in various places. Most time, it was used
before a seek. In other cases, the purpose was apparently resetting
the EOF flag. As far as I can see, this makes no sense anymore. At
least the stream_reset() calls paired with stream_seek() are completely
pointless. A seek will either seek inside the buffer (and reset the
EOF flag), or do an actual seek and reset all state.
Diffstat (limited to 'sub')
-rw-r--r-- | sub/subreader.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sub/subreader.c b/sub/subreader.c index 8c5a259196..f3821ba5ab 100644 --- a/sub/subreader.c +++ b/sub/subreader.c @@ -1212,7 +1212,6 @@ static const char* guess_cp(stream_t *st, const char *preferred_language, const detected_sub_cp = guess_buffer_cp(buffer, buflen, preferred_language, fallback); free(buffer); - stream_reset(st); stream_seek(st,0); return detected_sub_cp; @@ -1255,7 +1254,6 @@ sub_data* sub_read_file(char *filename, float fps, struct MPOpts *opts) int sub_format = SUB_INVALID; for (utf16 = 0; sub_format == SUB_INVALID && utf16 < 3; utf16++) { sub_format=sub_autodetect (fd, &uses_time, utf16); - stream_reset(fd); stream_seek(fd,0); } utf16--; |