git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
495dbc7
)
subsusf: simplification
author
Rémi Denis-Courmont
<remi@remlab.net>
Thu, 24 Apr 2014 19:44:55 +0000
(22:44 +0300)
committer
Rémi Denis-Courmont
<remi@remlab.net>
Thu, 24 Apr 2014 19:45:23 +0000
(22:45 +0300)
modules/codec/subsusf.c
patch
|
blob
|
history
diff --git
a/modules/codec/subsusf.c
b/modules/codec/subsusf.c
index
74a9cf7
..
0952e30
100644
(file)
--- a/
modules/codec/subsusf.c
+++ b/
modules/codec/subsusf.c
@@
-1065,12
+1065,10
@@
static char *StripTags( char *psz_subtitle )
psz_subtitle++;
}
- *psz_text = '\0';
+ *psz_text
++
= '\0';
- char *psz = realloc( psz_text_start, strlen( psz_text_start ) + 1 );
- if( psz ) psz_text_start = psz;
-
- return psz_text_start;
+ char *psz = realloc( psz_text_start, psz_text - psz_text_start );
+ return likely(psz != NULL) ? psz : psz_text_start;
}
/* Turn a HTML subtitle, turn into a plain-text version,