stream: provide a stream_get_size() convenience function

And use it everywhere, instead of retrieving the size manually. Slight
simplification.
This commit is contained in:
wm4
2015-08-18 00:10:54 +02:00
parent bf5eac8dd3
commit cf2fa9d3e5
9 changed files with 27 additions and 30 deletions

View File

@@ -208,8 +208,7 @@ int stream_dump(struct MPContext *mpctx, const char *source_filename)
if (!stream)
return -1;
int64_t size = 0;
stream_control(stream, STREAM_CTRL_GET_SIZE, &size);
int64_t size = stream_get_size(stream);
stream_set_capture_file(stream, opts->stream_dump);