diff options
author | wm4 <wm4@nowhere> | 2013-06-11 12:16:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-23 22:33:59 +0200 |
commit | 4f5e12136de717896bf322e75d42de1af09e1c3e (patch) | |
tree | f6b40f0ae7ab2ef410f1449e9626ab1140862836 /demux | |
parent | d064c69e1c958514c3ef4d7871bcd92c8ff92de9 (diff) |
stream: remove padding parameter from stream_read_complete()
Seems like a completely unnecessary complication. Instead, always add a
1 byte padding (could be extended if a caller needs it), and clear it.
Also add some documentation. There was some, but it was outdated and
incomplete.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_cue.c | 2 | ||||
-rw-r--r-- | demux/demux_edl.c | 2 | ||||
-rw-r--r-- | demux/demux_mf.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/demux/demux_cue.c b/demux/demux_cue.c index 04cc3229f3..073fa9d336 100644 --- a/demux/demux_cue.c +++ b/demux/demux_cue.c @@ -39,7 +39,7 @@ static int try_open_file(struct demuxer *demuxer) if (!mp_probe_cue((struct bstr) { buf, len })) return 0; stream_seek(s, 0); - demuxer->file_contents = stream_read_complete(s, demuxer, 1000000, 0); + demuxer->file_contents = stream_read_complete(s, demuxer, 1000000); if (demuxer->file_contents.start == NULL) return 0; if (!mp_probe_cue((struct bstr) { buf, len })) diff --git a/demux/demux_edl.c b/demux/demux_edl.c index 71d75e7f38..c35137ffb2 100644 --- a/demux/demux_edl.c +++ b/demux/demux_edl.c @@ -34,7 +34,7 @@ static int try_open_file(struct demuxer *demuxer) if (strncmp(buf, header, len)) return 0; stream_seek(s, 0); - demuxer->file_contents = stream_read_complete(s, demuxer, 1000000, 0); + demuxer->file_contents = stream_read_complete(s, demuxer, 1000000); if (demuxer->file_contents.start == NULL) return 0; return DEMUXER_TYPE_EDL; diff --git a/demux/demux_mf.c b/demux/demux_mf.c index 0db3fb8add..127ee8474e 100644 --- a/demux/demux_mf.c +++ b/demux/demux_mf.c @@ -78,7 +78,7 @@ static int demux_mf_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds){ if (stream) { stream_seek(stream, 0); - bstr data = stream_read_complete(stream, NULL, MF_MAX_FILE_SIZE, 0); + bstr data = stream_read_complete(stream, NULL, MF_MAX_FILE_SIZE); if (data.len) { demux_packet_t *dp = new_demux_packet(data.len); memcpy(dp->buffer, data.start, data.len); |