]> granicus.if.org Git - handbrake/commitdiff
CLI: Use json job instead of job
authorjstebbins <jstebbins.hb@gmail.com>
Tue, 9 Jun 2015 15:17:30 +0000 (15:17 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Tue, 9 Jun 2015 15:17:30 +0000 (15:17 +0000)
This allows libhb to log the json job for the CLI.

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

test/test.c

index 25cea9458cc4d2fee09129910226b3a4fffb175c..2748ea8b7373a71be362c29ed1b2d4e85a86e513 100644 (file)
@@ -798,18 +798,19 @@ static int HandleEvents(hb_handle_t * h, hb_dict_t *preset_dict)
                 return -1;
             }
 
-            hb_job_t   * job = NULL;
-            job = hb_dict_to_job(h, job_dict);
+            char * json_job;
+            json_job = hb_value_get_json(job_dict);
             hb_value_free(&job_dict);
-            if (job == NULL)
+            if (json_job == NULL)
             {
                 fprintf(stderr, "Error in setting up job! Aborting.\n");
                 die = 1;
                 return -1;
             }
 
-            hb_add( h, job );
-            hb_job_close( &job );
+
+            hb_add_json(h, json_job);
+            free(json_job);
             hb_start( h );
             break;
         }