summaryrefslogtreecommitdiffstats
path: root/libhb/decutf8sub.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-03-19 17:35:45 +0000
committerRodeo <[email protected]>2013-03-19 17:35:45 +0000
commit4651391b9568a6be2554a1cc77b370defd5931b3 (patch)
treeafd14f293bfa9ec8d1d1135f72f9f959dbf061cb /libhb/decutf8sub.c
parent830250fbb8d0a74f8d06cb995f1778d59933ce95 (diff)
decutf8sub: fix a bug when passing subtitles through to MP4.
The decoder was setting the last character but forgot to increment out->size, which led to weird artifacts being displayed when playing in e.g. VLC. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5346 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decutf8sub.c')
-rw-r--r--libhb/decutf8sub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/decutf8sub.c b/libhb/decutf8sub.c
index cf86678d7..812569279 100644
--- a/libhb/decutf8sub.c
+++ b/libhb/decutf8sub.c
@@ -45,7 +45,7 @@ static int decutf8Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
if ( out->size > 0 && out->data[out->size - 1] != '\0' ) {
// NOTE: out->size remains unchanged
hb_buffer_realloc( out, out->size + 1 );
- out->data[out->size] = '\0';
+ out->data[out->size++] = '\0';
}
*buf_in = NULL;