summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorOliver Freyermuth <o.freyermuth@googlemail.com>2016-01-24 20:20:08 +0100
committerwm4 <wm4@nowhere>2016-01-24 20:38:51 +0100
commit3c4f13c23a0363bcfd9e78650795f8352056f7f2 (patch)
tree7df7ec8209453c35421f2991c9876902676f9da8 /stream
parentd917efcd586b38c8f4576dd9b08d59042cd4465b (diff)
downloadmpv-3c4f13c23a0363bcfd9e78650795f8352056f7f2.tar.bz2
mpv-3c4f13c23a0363bcfd9e78650795f8352056f7f2.tar.xz
dvb: fix segmentation fault in case no valid configuration is found.
This was introduced in c55b242 .
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_dvb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c
index 352759af15..4316adfb56 100644
--- a/stream/stream_dvb.c
+++ b/stream/stream_dvb.c
@@ -947,14 +947,15 @@ static int dvb_open(stream_t *stream)
}
dvb_state_t* state = dvb_get_state(stream);
- state->stream_used = true;
- pthread_mutex_unlock(&global_dvb_state_lock);
priv->state = state;
if (state == NULL) {
MP_ERR(stream, "DVB CONFIGURATION IS EMPTY, exit\n");
+ pthread_mutex_unlock(&global_dvb_state_lock);
return STREAM_ERROR;
}
+ state->stream_used = true;
+ pthread_mutex_unlock(&global_dvb_state_lock);
if (state->is_on != 1) {
// State could be already initialized, for example, we just did a channel switch.