summaryrefslogtreecommitdiffstats
path: root/libhb/batch.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-09-15 16:34:22 +0000
committerjstebbins <[email protected]>2010-09-15 16:34:22 +0000
commit60f853bbbbee88da9cc9aa24b21705242b6157eb (patch)
tree67b0b137f750cc2b940577a7c7a38a64e41769cb /libhb/batch.c
parentbe3a03fca39d47d391efa36894124fc2e87eb5de (diff)
fix cli issue with batch scan and encode
I didn't implement 'single title scan' for batch mode cause it seemed contradictory. but the cli uses this when encoding, even in batch mode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3530 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/batch.c')
-rw-r--r--libhb/batch.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libhb/batch.c b/libhb/batch.c
index 28c40ca48..698798c7b 100644
--- a/libhb/batch.c
+++ b/libhb/batch.c
@@ -90,7 +90,7 @@ hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t )
if ( t < 0 )
return NULL;
- filename = hb_list_item( d->list_file, t );
+ filename = hb_list_item( d->list_file, t - 1 );
if ( filename == NULL )
return NULL;
@@ -100,6 +100,10 @@ hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t )
title = hb_stream_title_scan( stream );
hb_stream_close( &stream );
+ if ( title != NULL )
+ {
+ title->index = t;
+ }
return title;
}