diff options
author | Thomas V <imadoofus123@yahoo.com> | 2017-02-09 18:08:02 -0600 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-02-10 08:19:28 +0100 |
commit | 1672204dc53ffadb365ca516f9c261fb84da5766 (patch) | |
tree | a5669f7de9113fc890354ab783038bf599acc522 /stream | |
parent | f89ff14195888b94881fced13f5e1797c8f1d0ca (diff) | |
download | mpv-1672204dc53ffadb365ca516f9c261fb84da5766.tar.bz2 mpv-1672204dc53ffadb365ca516f9c261fb84da5766.tar.xz |
dvb: move priv allocation to dvb_open
This fixes a crash when changing channels; previously stream->priv would not
be initialized when dvb_get_state reused the existing state.
Signed-off-by: Thomas VanSelus <tvanselus@diospyros.us>
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_dvb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index 4cdbacc681..01ec6c2e77 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -931,6 +931,7 @@ static int dvb_open(stream_t *stream) return STREAM_ERROR; } + stream->priv = mp_get_config_group(stream, stream->global, &stream_dvb_conf); dvb_state_t* state = dvb_get_state(stream); dvb_priv_t *p = stream->priv; @@ -1009,7 +1010,6 @@ dvb_state_t *dvb_get_state(stream_t *stream) } struct mp_log *log = stream->log; struct mpv_global *global = stream->global; - stream->priv = mp_get_config_group(stream, stream->global, &stream_dvb_conf); dvb_priv_t *priv = stream->priv; int type, size; char filename[30], *name; |