diff options
author | wm4 <wm4@nowhere> | 2018-09-01 16:06:41 +0200 |
---|---|---|
committer | Anton Kindestam <antonki@kth.se> | 2018-12-06 10:31:10 +0100 |
commit | 9d8afcf79e3a4b563800dcf7fc08779355e9d602 (patch) | |
tree | 4e7e6e74d02f2b692194b79569d895d3ccbf7652 /common | |
parent | 02756c3735f8e7e8ac6b5ca1168b68a6a325122d (diff) | |
download | mpv-9d8afcf79e3a4b563800dcf7fc08779355e9d602.tar.bz2 mpv-9d8afcf79e3a4b563800dcf7fc08779355e9d602.tar.xz |
demux: add another stream recording feature
--record-file is nice, but only sometimes. If you watch some sort of
livestream which you want to record, it's actually much nicer not to
record what you're currently "seeing", but anything you're receiving.
Diffstat (limited to 'common')
-rw-r--r-- | common/recorder.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/recorder.c b/common/recorder.c index 9970c05c32..6b233d41bb 100644 --- a/common/recorder.c +++ b/common/recorder.c @@ -335,8 +335,7 @@ void mp_recorder_mark_discontinuity(struct mp_recorder *priv) // mp_recorder_create(). struct mp_recorder_sink *mp_recorder_get_sink(struct mp_recorder *r, int stream) { - assert(stream >= 0 && stream < r->num_streams); - return r->streams[stream]; + return stream >= 0 && stream < r->num_streams ? r->streams[stream] : NULL; } // Pass a packet to the given stream. The function does not own the packet, but |