diff options
author | ritsuka <[email protected]> | 2009-05-08 16:03:21 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2009-05-08 16:03:21 +0000 |
commit | fc192423c6a523f059c26a384df6908b4d4c2b1d (patch) | |
tree | 2c5beaf86edc5f05e4ce6f87246bf9bf4cefaa36 /libhb/deccc608sub.c | |
parent | 242a3fda8463abef59022c2af96cba6f734250dc (diff) |
- Fixed the size for tx3g samples in muxmp4.c I forgot to add the size of the string byte count to the total sample size.
- Small fixes in deccc608sub.c, trim null characters away.
- Moved the duration time from hb_mux_object_s to hb_mux_data_s so that multiple subtitle tracks can be muxed with interference.
- Uses par to calculate the subtitle track width so that It will be the same as the video track.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2406 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deccc608sub.c')
-rw-r--r-- | libhb/deccc608sub.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libhb/deccc608sub.c b/libhb/deccc608sub.c index 5cfe238db..87899b4c4 100644 --- a/libhb/deccc608sub.c +++ b/libhb/deccc608sub.c @@ -535,6 +535,8 @@ void get_char_in_unicode (unsigned char *buffer, unsigned char c) int get_char_in_utf_8 (unsigned char *buffer, unsigned char c) // Returns number of bytes used { + if (c==0x00) + return 0; if (c<0x80) // Regular line-21 character set, mostly ASCII except these exceptions { switch (c) @@ -1646,7 +1648,7 @@ int write_cc_buffer_as_srt (struct eia608_screen *data, struct s_write *wb) } if (wb->enc_buffer_used) { - hb_buffer_t *buffer = hb_buffer_init( wb->enc_buffer_used + 2 ); + hb_buffer_t *buffer = hb_buffer_init( wb->enc_buffer_used + 1 ); buffer->start = ms_start; buffer->stop = ms_end; memcpy( buffer->data, wb->enc_buffer, wb->enc_buffer_used + 1 ); |