diff options
author | John Stebbins <[email protected]> | 2017-02-27 13:05:12 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-02-27 13:06:52 -0700 |
commit | 85f88811ee2307ddac9196c8963c35a3d335ddc6 (patch) | |
tree | 469f0cf2aca9927b6d725cdc4a43117c61513d44 /libhb/batch.c | |
parent | 40b86f9ad509db29be0babb335e96f62b0b1c230 (diff) |
batch: Support --min-duration when doing batch scans
Fixes https://github.com/HandBrake/HandBrake/issues/501
Diffstat (limited to 'libhb/batch.c')
-rw-r--r-- | libhb/batch.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libhb/batch.c b/libhb/batch.c index 37e626ce7..cc7808e6c 100644 --- a/libhb/batch.c +++ b/libhb/batch.c @@ -114,7 +114,7 @@ int hb_batch_title_count( hb_batch_t * d ) /*********************************************************************** * hb_batch_title_scan **********************************************************************/ -hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t ) +hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t, uint64_t min_duration ) { hb_title_t * title; @@ -139,6 +139,11 @@ hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t ) title = hb_stream_title_scan( stream, title ); hb_stream_close( &stream ); + if( title->duration < min_duration ) + { + hb_log( "batch: ignoring title (too short)" ); + hb_title_close(&title); + } return title; } |