1
0
Fork 0

Fixed memory leak in mpls parsing

audio_ref's weren't freed in _clean_stn.
This commit is contained in:
Ferdinand Holzer 2012-05-27 21:42:51 +02:00 committed by hpi1
parent dec829ac71
commit 9abc8544d5
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,4 @@
- Fixed memory leaks
- Automatic language selection: disable subtitles when audio is in the same language
- Fixed accessing outside of array bounds
- Default to stream 0 when requested language not found

View File

@ -401,6 +401,14 @@ _parse_stn(BITSTREAM *bits, MPLS_STN *stn)
static void
_clean_stn(MPLS_STN *stn)
{
if(stn->secondary_audio) {
X_FREE(stn->secondary_audio->sa_primary_audio_ref);
}
if(stn->secondary_video) {
X_FREE(stn->secondary_video->sv_secondary_audio_ref);
X_FREE(stn->secondary_video->sv_pip_pg_ref);
}
X_FREE(stn->video);
X_FREE(stn->audio);
X_FREE(stn->pg);