mirror of https://github.com/mpv-player/mpv
fix possible segfault on lavf demuxer patch by (adland <adland123 at yahoo dot com>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12305 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
813b34f68f
commit
057916ee65
|
@ -350,9 +350,11 @@ int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg)
|
|||
void demux_close_lavf(demuxer_t *demuxer)
|
||||
{
|
||||
lavf_priv_t* priv = demuxer->priv;
|
||||
|
||||
if (priv){
|
||||
av_close_input_file(priv->avfc); priv->avfc= NULL;
|
||||
if(priv->avfc)
|
||||
{
|
||||
av_close_input_file(priv->avfc); priv->avfc= NULL;
|
||||
}
|
||||
free(priv); demuxer->priv= NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue