diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-05 16:33:29 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-05 16:33:29 +0000 |
commit | f05739485150466c58cacf0491a56eeda2906ea5 (patch) | |
tree | 1b110ca1edbdaeac7dccecd154a5b007d60934b6 /stream/tv.c | |
parent | 153e47522c23fdfa041a2a7e6c6736c8f819108c (diff) | |
download | mpv-f05739485150466c58cacf0491a56eeda2906ea5.tar.bz2 mpv-f05739485150466c58cacf0491a56eeda2906ea5.tar.xz |
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
Diffstat (limited to 'stream/tv.c')
-rw-r--r-- | stream/tv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/stream/tv.c b/stream/tv.c index a026bfc6c8..c58f415161 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -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; } |