mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
Fix sub_free to actually free the subtitle data.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30390 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7b953c1763
commit
3526daed7a
12
subreader.c
12
subreader.c
@ -2249,15 +2249,15 @@ void dump_sami(sub_data* subd, float fps) {
|
||||
|
||||
void sub_free( sub_data * subd )
|
||||
{
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
if ( !subd ) return;
|
||||
|
||||
if (subd->subtitles) {
|
||||
for (i=0; i < subd->subtitles->lines; i++) free( subd->subtitles->text[i] );
|
||||
free( subd->subtitles );
|
||||
}
|
||||
if (subd->filename) free( subd->filename );
|
||||
for (i = 0; i < subd->sub_num; i++)
|
||||
for (j = 0; j < subd->subtitles[i].lines; j++)
|
||||
free( subd->subtitles[i].text[j] );
|
||||
free( subd->subtitles );
|
||||
free( subd->filename );
|
||||
free( subd );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user