summaryrefslogtreecommitdiff
path: root/src/spu_dec
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2010-07-25 16:37:27 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2010-07-25 16:37:27 +0100
commit51ee5df118326a3d2374f2432fff63dd3edceaf6 (patch)
tree6000b579c7ee6a062e3e642a48c74d68a23bf3d3 /src/spu_dec
parent9d5da6a3aae928d7fd702d03ea8212f2db48dd5b (diff)
parent070ab73cf3ac064f23895cb19b2e67717f42077d (diff)
downloadxine-lib-51ee5df118326a3d2374f2432fff63dd3edceaf6.tar.gz
xine-lib-51ee5df118326a3d2374f2432fff63dd3edceaf6.tar.bz2
Merge from 1.1; resync translation files.
--HG-- rename : po/libxine1.pot => po/libxine2.pot rename : src/libmad/xine_mad_decoder.c => src/audio_dec/xine_mad_decoder.c rename : src/libspucmml/xine_cmml_decoder.c => src/spu_dec/cmml_decoder.c
Diffstat (limited to 'src/spu_dec')
-rw-r--r--src/spu_dec/cmml_decoder.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/spu_dec/cmml_decoder.c b/src/spu_dec/cmml_decoder.c
index 912e1aed3..53d5fa9ea 100644
--- a/src/spu_dec/cmml_decoder.c
+++ b/src/spu_dec/cmml_decoder.c
@@ -331,9 +331,9 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
/* how many lines does the anchor text take up? */
this->lines=0;
{
- int i = 0;
- while (*anchor_text) {
- if (*anchor_text == '\r' || *anchor_text == '\n') {
+ int i = 0, index = 0;
+ while (anchor_text[index]) {
+ if (anchor_text[index] == '\r' || anchor_text[index] == '\n') {
if (i) {
/* match a newline and there are chars on the current line ... */
this->text[ this->lines ][i] = '\0';
@@ -342,11 +342,11 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
}
} else {
/* found a normal (non-line-ending) character */
- this->text[ this->lines ][i] = *anchor_text;
+ this->text[ this->lines ][i] = anchor_text[index];
if (i<SUB_BUFSIZE-1)
i++;
}
- anchor_text++;
+ index++;
}
/* always NULL-terminate the string */
@@ -355,6 +355,7 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
this->lines++;
}
}
+ free (anchor_text);
/* initialize decoder if needed */
if( !this->cached_width || !this->cached_height || !this->cached_img_duration || !this->osd ) {