mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Fix memleaks caused by missing vorbis/theora_info/comment_clear calls.
Code still seems wrong to me for multiple audio tracks, since there is only one vorbis comment/info entry for the demuxer, not one per track? git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21516 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
dd4bc17421
commit
a4147be5f7
@ -994,6 +994,8 @@ int demux_ogg_open(demuxer_t* demuxer) {
|
||||
n_video - 1);
|
||||
if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih,MSGL_V);
|
||||
}
|
||||
theora_comment_clear(&cc);
|
||||
theora_info_clear(&inf);
|
||||
# endif /* HAVE_OGGTHEORA */
|
||||
} else if (pack.bytes >= 4 && !strncmp (&pack.packet[0], "fLaC", 4)) {
|
||||
sh_a = new_sh_audio_aid(demuxer,ogg_d->num_sub, n_audio);
|
||||
@ -1621,6 +1623,8 @@ static void demux_close_ogg(demuxer_t* demuxer) {
|
||||
if (ogg_d->text_langs[i]) free(ogg_d->text_langs[i]);
|
||||
free(ogg_d->text_langs);
|
||||
}
|
||||
vorbis_info_clear(&ogg_d->vi);
|
||||
vorbis_comment_clear(&ogg_d->vc);
|
||||
free(ogg_d);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user