Mercurial > mplayer.hg
comparison libmpdemux/demux_lavf.c @ 12304:434242b0706c
fix possible segfault on lavf demuxer patch by (adland <adland123 at yahoo dot com>)
author | michael |
---|---|
date | Mon, 26 Apr 2004 19:55:55 +0000 |
parents | 44f33fb19acf |
children | 3a7ef0fbc2f9 |
comparison
equal
deleted
inserted
replaced
12303:f881c918739b | 12304:434242b0706c |
---|---|
348 } | 348 } |
349 | 349 |
350 void demux_close_lavf(demuxer_t *demuxer) | 350 void demux_close_lavf(demuxer_t *demuxer) |
351 { | 351 { |
352 lavf_priv_t* priv = demuxer->priv; | 352 lavf_priv_t* priv = demuxer->priv; |
353 | |
354 if (priv){ | 353 if (priv){ |
355 av_close_input_file(priv->avfc); priv->avfc= NULL; | 354 if(priv->avfc) |
355 { | |
356 av_close_input_file(priv->avfc); priv->avfc= NULL; | |
357 } | |
356 free(priv); demuxer->priv= NULL; | 358 free(priv); demuxer->priv= NULL; |
357 } | 359 } |
358 } | 360 } |
359 | 361 |
360 #endif // USE_LIBAVFORMAT | 362 #endif // USE_LIBAVFORMAT |