{
channel_t *ch = (channel_t *)obj;
const char *s;
+ char *chan_name;
int b = *(int *)p;
if (ch->ch_autoname != b) {
if (b == 0 && tvh_str_default(ch->ch_name, NULL) == NULL) {
s = channel_get_name(ch, NULL);
if (s) {
+ chan_name = strdup(s);
free(ch->ch_name);
- ch->ch_name = strdup(s);
+ ch->ch_name = chan_name;
} else {
return 0;
}
if ((n = im->im_handler->read(mi, im)) < 0) {
tvherror(LS_IPTV, "read() error %s", strerror(errno));
im->im_handler->stop(mi, im);
+ tvh_mutex_unlock(&iptv_lock);
break;
}
r = iptv_input_recv_packets(im, n);
free(hp->hls_url_after_key);
hp->hls_url_after_key = url;
url = strdup(s);
- free(absolute_key_url);
hc->hc_data_complete = iptv_http_complete_key;
sbuf_reset(&hp->key_sbuf, 32);
}
iptv_http_reconnect(hc, url);
end:
free(url);
+ free(absolute_key_url);
fin:
htsmsg_destroy(m);
} else {