Bugfix: sub_recode could deallocate global sub_cp under some circumstances.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20618 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eugeni 2006-11-03 01:41:48 +00:00
parent 1547c31174
commit 452d1d6c61
1 changed files with 1 additions and 1 deletions

View File

@ -805,7 +805,7 @@ static char* sub_recode(char* data, size_t size, char* codepage)
assert(codepage);
{
char* cp_tmp = codepage;
char* cp_tmp = codepage ? strdup(codepage) : 0;
#ifdef HAVE_ENCA
char enca_lang[3], enca_fallback[100];
if (sscanf(codepage, "enca:%2s:%99s", enca_lang, enca_fallback) == 2