mirror of https://github.com/mpv-player/mpv
dvb: fix segmentation fault in case no valid configuration is found.
This was introduced in c55b242
.
This commit is contained in:
parent
d917efcd58
commit
3c4f13c23a
|
@ -947,14 +947,15 @@ static int dvb_open(stream_t *stream)
|
||||||
}
|
}
|
||||||
|
|
||||||
dvb_state_t* state = dvb_get_state(stream);
|
dvb_state_t* state = dvb_get_state(stream);
|
||||||
state->stream_used = true;
|
|
||||||
pthread_mutex_unlock(&global_dvb_state_lock);
|
|
||||||
|
|
||||||
priv->state = state;
|
priv->state = state;
|
||||||
if (state == NULL) {
|
if (state == NULL) {
|
||||||
MP_ERR(stream, "DVB CONFIGURATION IS EMPTY, exit\n");
|
MP_ERR(stream, "DVB CONFIGURATION IS EMPTY, exit\n");
|
||||||
|
pthread_mutex_unlock(&global_dvb_state_lock);
|
||||||
return STREAM_ERROR;
|
return STREAM_ERROR;
|
||||||
}
|
}
|
||||||
|
state->stream_used = true;
|
||||||
|
pthread_mutex_unlock(&global_dvb_state_lock);
|
||||||
|
|
||||||
if (state->is_on != 1) {
|
if (state->is_on != 1) {
|
||||||
// State could be already initialized, for example, we just did a channel switch.
|
// State could be already initialized, for example, we just did a channel switch.
|
||||||
|
|
Loading…
Reference in New Issue