# HG changeset patch # User reimar # Date 1165876333 0 # Node ID 37c795807a1d4867e6d332ac7db0953e3bf81dc0 # Parent 8a710a7b68ea265528fdac78c56a7fccec6fa8d5 Another simplification diff -r 8a710a7b68ea -r 37c795807a1d libvo/sub.c --- a/libvo/sub.c Mon Dec 11 22:29:08 2006 +0000 +++ b/libvo/sub.c Mon Dec 11 22:32:13 2006 +0000 @@ -383,7 +383,6 @@ inline static void vo_update_text_sub(mp_osd_obj_t* obj,int dxs,int dys){ unsigned char *t; int c,i,j,l,x,y,font,prevc,counter; - int len; int k; int lastStripPosition; int xsize; @@ -417,9 +416,8 @@ xsize = -vo_font->charspace; l--; t=vo_sub->text[i++]; - len=strlen(t)-1; char_position = 0; - char_seq = (int *) malloc((len + 1) * sizeof(int)); + char_seq = calloc(strlen(t), sizeof(int)); prevc = -1;