diff options
author | Oliver Freyermuth <o.freyermuth@googlemail.com> | 2023-08-29 21:55:35 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-09-03 13:08:58 +0200 |
commit | 7021d095b198d15fd4de4d9bc2ec6b12c0b8c2e3 (patch) | |
tree | a57ecc1515c7450b05b26cb46be2f4d0e6392d5d /stream | |
parent | d88e3d105a725ce446e0f2ceb25d473ec6fdd721 (diff) | |
download | mpv-7021d095b198d15fd4de4d9bc2ec6b12c0b8c2e3.tar.bz2 mpv-7021d095b198d15fd4de4d9bc2ec6b12c0b8c2e3.tar.xz |
stream/dvbin: do not forget channel list for multiply delivery systems
dvb_get_channels is expected to append to an existing channel list.
For adapters supporting many delivery systems, a subsequent channel list
may turn up with a non-existent channel config, and the pointer
to the previously parsed channel list may be lost
(i.e. the list will be leaked and no channels detected).
Fix this by passing through the existing list (which may be NULL)
in case no new channels are found.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_dvb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index dc70b43b19..e04bb73d06 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -262,7 +262,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, char line[CHANNEL_LINE_LEN], *colon; if (!filename) - return NULL; + return list; int fields, cnt, k; int has8192, has0; @@ -283,7 +283,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, filename, get_dvb_delsys(delsys)); if ((f = fopen(filename, "r")) == NULL) { mp_fatal(log, "CAN'T READ CONFIG FILE %s\n", filename); - return NULL; + return list; } if (list == NULL) { |