1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 00:42:57 +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:
voroshil 2007-11-05 16:33:29 +00:00
parent 153e47522c
commit f057394851

View File

@ -617,7 +617,10 @@ static int tv_uninit(tvi_handle_t *tvh)
if(!tvh) return 1;
if (!tvh->priv) return 1;
res=tvh->functions->uninit(tvh->priv);
if(res) tvh->priv=NULL;
if(res) {
free(tvh->priv);
tvh->priv=NULL;
}
return res;
}
@ -784,7 +787,7 @@ static void demux_close_tv(demuxer_t *demuxer)
{
tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->priv);
if (!tvh) return;
tvh->functions->uninit(tvh->priv);
tv_uninit(tvh);
demuxer->priv=NULL;
}