Updated libass to 7e45532
authorSubJunk <SubJunk@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 19 Jan 2013 21:47:31 +0000 (21:47 +0000)
committerSubJunk <SubJunk@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 19 Jan 2013 21:47:31 +0000 (21:47 +0000)
- Removes a redundant warning message
- Fixes a wrong condition
- Fixes a leak when an error occurs

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@35795 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass.c
libass/ass_parse.c
libass/ass_render.c

index bc05d69..fcd0d1c 100644 (file)
@@ -988,7 +988,9 @@ static char *sub_recode(ASS_Library *library, char *data, size_t size,
                     oleft += size;
                 } else {
                     ass_msg(library, MSGL_WARN, "Error recoding file");
-                    return NULL;
+                    free(outbuf);
+                   outbuf = NULL;
+                   goto out;
                 }
             } else if (clear)
                 break;
@@ -996,6 +998,7 @@ static char *sub_recode(ASS_Library *library, char *data, size_t size,
         outbuf[osize - oleft - 1] = 0;
     }
 
+out:
     if (icdsc != (iconv_t) (-1)) {
         (void) iconv_close(icdsc);
         icdsc = (iconv_t) (-1);
index 3966a43..8fa1689 100644 (file)
@@ -241,7 +241,7 @@ static char *parse_vector_clip(ASS_Renderer *render_priv, char *p)
     drawing->scale = scale;
     drawing->scale_x = render_priv->font_scale_x * render_priv->font_scale;
     drawing->scale_y = render_priv->font_scale;
-    while (*p != ')' && *p != '}' && p != 0)
+    while (*p != ')' && *p != '}' && *p != 0)
         ass_drawing_add_char(drawing, *p++);
     skipopt(')');
 
index 7a55062..b0c6f0c 100644 (file)
@@ -546,7 +546,6 @@ static void blend_vector_clip(ASS_Renderer *render_priv,
     ASS_Drawing *drawing = render_priv->state.clip_drawing;
     BitmapHashKey key;
     BitmapHashValue *val;
-    int error;
 
     if (!drawing)
         return;
@@ -586,10 +585,6 @@ static void blend_vector_clip(ASS_Renderer *render_priv,
 
         clip_bm = outline_to_bitmap(render_priv->library,
                 render_priv->ftlibrary, outline, 0);
-        if (clip_bm == NULL) {
-            ass_msg(render_priv->library, MSGL_WARN,
-                "Clip vector rasterization failed: %d. Skipping.", error);
-        }
 
         // Add to cache
         memset(&v, 0, sizeof(v));