[vlc-commits] demux: ogg: correctly free vorbis info (refs #18015)
Francois Cartegnie
git at videolan.org
Wed Feb 15 11:01:10 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 15 10:57:01 2017 +0100| [b8b6cc3bb8e24c0d556ce2c40fc1fad65921cdb0] | committer: Francois Cartegnie
demux: ogg: correctly free vorbis info (refs #18015)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b8b6cc3bb8e24c0d556ce2c40fc1fad65921cdb0
---
modules/demux/ogg.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 9746658..37d485a 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -2226,10 +2226,12 @@ static void Ogg_CleanSpecificData( logical_stream_t *p_stream )
#ifdef HAVE_LIBVORBIS
if ( p_stream->fmt.i_codec == VLC_CODEC_VORBIS )
{
- vorbis_info_clear( p_stream->special.vorbis.p_info );
- FREENULL( p_stream->special.vorbis.p_info );
- vorbis_comment_clear( p_stream->special.vorbis.p_comment );
- FREENULL( p_stream->special.vorbis.p_comment );
+ if( p_stream->special.vorbis.p_info )
+ vorbis_info_clear( p_stream->special.vorbis.p_info );
+ p_stream->special.vorbis.p_info = NULL;
+ if( p_stream->special.vorbis.p_comment )
+ vorbis_comment_clear( p_stream->special.vorbis.p_comment );
+ p_stream->special.vorbis.p_comment = NULL;
p_stream->special.vorbis.i_headers_flags = 0;
}
#else
More information about the vlc-commits
mailing list