summaryrefslogtreecommitdiffstats
path: root/player/misc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-18 00:10:54 +0200
committerwm4 <wm4@nowhere>2015-08-18 00:10:54 +0200
commitcf2fa9d3e5bd6b8ca3e1637080b665e896ea60a0 (patch)
tree1de6ea60ee9f38ad5b7b66d7d15ee7a806a1520b /player/misc.c
parentbf5eac8dd3f142acd0d506407f1ae853ada3c5bc (diff)
downloadmpv-cf2fa9d3e5bd6b8ca3e1637080b665e896ea60a0.tar.bz2
mpv-cf2fa9d3e5bd6b8ca3e1637080b665e896ea60a0.tar.xz
stream: provide a stream_get_size() convenience function
And use it everywhere, instead of retrieving the size manually. Slight simplification.
Diffstat (limited to 'player/misc.c')
-rw-r--r--player/misc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/player/misc.c b/player/misc.c
index 3d54d36ff7..add73e5a17 100644
--- a/player/misc.c
+++ b/player/misc.c
@@ -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);