summaryrefslogtreecommitdiffstats
path: root/libhb/muxmkv.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2013-09-22 17:19:38 +0000
committerjstebbins <[email protected]>2013-09-22 17:19:38 +0000
commit5e712218d8eb3f71a06356ed6f952b86ca947fca (patch)
treecd20ec0c7f22a94c11594deb195c7ec939dee4d1 /libhb/muxmkv.c
parent10fda25f44d362349694a42127e8ba4974a4a6ad (diff)
libhb: make libhb internal character code utf8
This makes libhb expect all strings passed to it to be in utf8 format. The cli converts the converts from the current code page to utf8. libhb converts back to the current code page when necessary for libraries that expect it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5798 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmkv.c')
-rw-r--r--libhb/muxmkv.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c
index f96a60e76..0a4cdd951 100644
--- a/libhb/muxmkv.c
+++ b/libhb/muxmkv.c
@@ -119,7 +119,18 @@ static int MKVInit( hb_mux_object_t * m )
track = calloc(1, sizeof(mk_TrackConfig));
- m->file = mk_createWriter(job->file, 1000000, 1);
+ // convert file name to current code page
+ char *path = hb_utf8_to_cp(job->file);
+ if (path == NULL)
+ {
+ hb_error("Could not convert string, out of memory?");
+ job->mux_data = NULL;
+ *job->die = 1;
+ return 0;
+ }
+
+ m->file = mk_createWriter(path, 1000000, 1);
+ free(path);
if( !m->file )
{