]> granicus.if.org Git - handbrake/commitdiff
json: fix plane size in hb_get_preview_image_json
authorjstebbins <jstebbins.hb@gmail.com>
Fri, 19 Dec 2014 00:25:10 +0000 (00:25 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Fri, 19 Dec 2014 00:25:10 +0000 (00:25 +0000)
The actual size of the base64 encoded data is the length of the string

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6611 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/hb_json.c

index 401607f7b24cc0f54747271b140054670559dc09..b25417a60cb1d3b0a19835b28a00f5779f958d80 100644 (file)
@@ -1269,6 +1269,7 @@ char* hb_get_preview_json(hb_handle_t * h, const char *json_param)
         av_base64_encode(plane_base64, base64size,
                          image->plane[ii].data, image->plane[ii].size);
 
+        base64size = strlen(plane_base64);
         json_t *plane_dict;
         plane_dict = json_pack_ex(&error, 0,
             "{s:o, s:o, s:o, s:o, s:o, s:o}",