summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-03-07 22:25:48 +0000
committerjstebbins <[email protected]>2015-03-07 22:25:48 +0000
commit7705413a03a90c16734b40fb7bc492be8b56ab6f (patch)
tree2b3c861e0a7b78e45869a191b20f7dc57c0fe48b /libhb/common.c
parenta4ad5062c3fa1787b208389123bb81ea57483142 (diff)
json: automatically scan title when processing json jobs
Simplifies the WinGui. This also changes how jobs are processed. Creating the sub-jobs for multiple passes is delayed until after scanning and immediately before running the job. Working status has also changed. Sub-job passes are identified in status with an ID that allows the frontend to definitively identify what pass is in progress. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6976 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 78b4437c6..339c3919f 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -2582,7 +2582,7 @@ void hb_list_rem( hb_list_t * l, void * p )
*********************************************************************/
void * hb_list_item( const hb_list_t * l, int i )
{
- if( i < 0 || i >= l->items_count )
+ if( l == NULL || i < 0 || i >= l->items_count )
{
return NULL;
}
@@ -2712,6 +2712,9 @@ void hb_list_close( hb_list_t ** _l )
{
hb_list_t * l = *_l;
+ if (l == NULL)
+ return;
+
free( l->items );
free( l );
@@ -3048,7 +3051,7 @@ static void job_setup(hb_job_t * job, hb_title_t * title)
job->vquality = -1.0;
job->vbitrate = 1000;
job->twopass = 0;
- job->pass = 0;
+ job->pass_id = HB_PASS_ENCODE;
job->vrate = title->vrate;
job->mux = HB_MUX_MP4;
@@ -3078,6 +3081,8 @@ static void job_clean( hb_job_t * job )
hb_filter_object_t *filter;
hb_attachment_t *attachment;
+ free((void*)job->json);
+ job->json = NULL;
free(job->encoder_preset);
job->encoder_preset = NULL;
free(job->encoder_tune);