1
mirror of https://github.com/mpv-player/mpv synced 2024-09-12 23:45:53 +02:00

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>
This commit is contained in:
Thomas V 2017-02-09 18:08:02 -06:00 committed by wm4
parent f89ff14195
commit 1672204dc5

View File

@ -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;