From: Grigori Goronzy Date: Wed, 6 Jan 2010 09:44:23 +0000 (+0100) Subject: Don't flag for freeing if codepage is unspecified X-Git-Tag: 0.9.9~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29fd817f4678ea7f674c7252ec84e87f4302c06a;p=libass Don't flag for freeing if codepage is unspecified Patch by Arne Morten Kvarving . --- diff --git a/libass/ass.c b/libass/ass.c index f7f5bcc..6becb39 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -1100,12 +1100,13 @@ ASS_Track *ass_read_memory(ASS_Library *library, char *buf, return 0; #ifdef CONFIG_ICONV - if (codepage) + if (codepage) { buf = sub_recode(library, buf, bufsize, codepage); - if (!buf) - return 0; - else - need_free = 1; + if (!buf) + return 0; + else + need_free = 1; + } #endif track = parse_memory(library, buf); if (need_free)