From 9d8afcf79e3a4b563800dcf7fc08779355e9d602 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 1 Sep 2018 16:06:41 +0200 Subject: 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. --- common/recorder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'common') 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 -- cgit v1.2.3