mirror of
https://github.com/mpv-player/mpv
synced 2025-02-19 06:17:00 +00:00
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.
This commit is contained in:
parent
d88e3d105a
commit
7021d095b1
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user