summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_lavf.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-26 19:55:55 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-26 19:55:55 +0000
commit057916ee65818d8211a0e546fb9e14ff11856f0b (patch)
tree688bc2e820fe34e8f0703eaacbf8d90c96e936f8 /libmpdemux/demux_lavf.c
parent813b34f68fd515f40abd5c3bc2923624dc64178e (diff)
downloadmpv-057916ee65818d8211a0e546fb9e14ff11856f0b.tar.bz2
mpv-057916ee65818d8211a0e546fb9e14ff11856f0b.tar.xz
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
Diffstat (limited to 'libmpdemux/demux_lavf.c')
-rw-r--r--libmpdemux/demux_lavf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index b42cc5585f..b4f7bf9378 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -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;
}
}