Crash fix for: "[MPlayer-users] Crash of mencoder in demux_ts.c line 2728"

"The code which crashes looks like its trying to parse the subtitle stream,
 and failing, I assume because dvbsub_lang is a invalid pointer, or null."
Patch by Nico Sabi


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16293 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
gpoirier 2005-08-23 08:23:53 +00:00
parent dead4d1193
commit dd4390af8b
1 changed files with 3 additions and 0 deletions

View File

@ -2732,6 +2732,8 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
int asgn = 0;
uint8_t *lang;
if(dvdsub_lang)
{
if(!strcmp(dvdsub_lang, ""))
asgn = 1;
else
@ -2742,6 +2744,7 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
else
asgn = 0;
}
}
if(asgn)
{