From 60f853bbbbee88da9cc9aa24b21705242b6157eb Mon Sep 17 00:00:00 2001 From: jstebbins Date: Wed, 15 Sep 2010 16:34:22 +0000 Subject: 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 --- libhb/batch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libhb/batch.c') 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; } -- cgit v1.2.3