diff options
author | Grigori Goronzy <greg@blackbox> | 2010-01-06 10:44:23 +0100 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2010-01-06 10:44:23 +0100 |
commit | 29fd817f4678ea7f674c7252ec84e87f4302c06a (patch) | |
tree | 6332ad22c868ca5e6765a0f4b28eccbb6a365b42 /libass/ass.c | |
parent | 2e6b0b7963372fd498d064636a70d36ed2d60290 (diff) | |
download | libass-29fd817f4678ea7f674c7252ec84e87f4302c06a.tar.bz2 libass-29fd817f4678ea7f674c7252ec84e87f4302c06a.tar.xz |
Don't flag for freeing if codepage is unspecified
Patch by Arne Morten Kvarving <spiff@micron.(none)>.
Diffstat (limited to 'libass/ass.c')
-rw-r--r-- | libass/ass.c | 11 |
1 files changed, 6 insertions, 5 deletions
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) |