Skip to content

Commit ebc7c07

Browse files
committed
Merge branch 'pr/n545_Izaron'
2 parents 7acb3c3 + 5d8ce8b commit ebc7c07

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lib_ccx/ccx_common_option.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ struct encoder_cfg
4646
int trim_subs; // " Remove spaces at sides? "
4747
int sentence_cap ; // FIX CASE? = Fix case?
4848
int splitbysentence; // Split text into complete sentences and prorate time?
49+
#ifdef WITH_LIBCURL
4950
char *curlposturl; // If out=curl, where do we send the data to?
51+
#endif
5052

5153
int with_semaphore; // Write a .sem file on file open and delete it on close?
5254
/* Credit stuff */

src/lib_ccx/ccx_encoders_curl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ int write_cc_bitmap_as_libcurl(struct cc_subtitle *sub, struct encoder_ctx *cont
6868
curl_free (urlencoded);
6969
mprint("%s", curlline);
7070

71-
curl_easy_setopt(curl, CURLOPT_URL, "127.0.0.1:3000/frame/");
71+
char *result = malloc(strlen(ccx_options.curlposturl) + strlen("/frame/") + 1);
72+
strcpy(result, ccx_options.curlposturl);
73+
strcat(result, "/frame/");
74+
curl_easy_setopt(curl, CURLOPT_URL, result);
7275
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, curlline);
76+
free(result);
7377

7478
res = curl_easy_perform(curl);
7579
/* Check for errors */

0 commit comments

Comments
 (0)