mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 05:41:16 +00:00
Do not access ogg_d->subs after freeing it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21829 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e3fe6113a6
commit
50dc3ce2c7
@ -1600,7 +1600,12 @@ static void demux_close_ogg(demuxer_t* demuxer) {
|
||||
if(ogg_d->subs)
|
||||
{
|
||||
for (i = 0; i < ogg_d->num_sub; i++)
|
||||
{
|
||||
os = &ogg_d->subs[i];
|
||||
ogg_stream_clear(&ogg_d->subs[i].stream);
|
||||
if(os->vi_inited)
|
||||
vorbis_info_clear(&os->vi);
|
||||
}
|
||||
free(ogg_d->subs);
|
||||
}
|
||||
if(ogg_d->syncpoints)
|
||||
@ -1612,11 +1617,6 @@ 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);
|
||||
}
|
||||
if(demuxer->audio->id > -1 && demuxer->audio->id < ogg_d->num_sub) {
|
||||
os = &ogg_d->subs[demuxer->audio->id];
|
||||
if(os->vi_inited)
|
||||
vorbis_info_clear(&os->vi);
|
||||
}
|
||||
free(ogg_d);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user