mirror of
https://github.com/mpv-player/mpv
synced 2025-01-13 10:26:09 +00:00
Fix segmentation fault after audio initialization failure in tv driver.
Error was caused by double call to driver's uninit() routine. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24971 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
153e47522c
commit
f057394851
@ -617,7 +617,10 @@ static int tv_uninit(tvi_handle_t *tvh)
|
|||||||
if(!tvh) return 1;
|
if(!tvh) return 1;
|
||||||
if (!tvh->priv) return 1;
|
if (!tvh->priv) return 1;
|
||||||
res=tvh->functions->uninit(tvh->priv);
|
res=tvh->functions->uninit(tvh->priv);
|
||||||
if(res) tvh->priv=NULL;
|
if(res) {
|
||||||
|
free(tvh->priv);
|
||||||
|
tvh->priv=NULL;
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,7 +787,7 @@ static void demux_close_tv(demuxer_t *demuxer)
|
|||||||
{
|
{
|
||||||
tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->priv);
|
tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->priv);
|
||||||
if (!tvh) return;
|
if (!tvh) return;
|
||||||
tvh->functions->uninit(tvh->priv);
|
tv_uninit(tvh);
|
||||||
demuxer->priv=NULL;
|
demuxer->priv=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user