]> granicus.if.org Git - handbrake/commitdiff
scan: only apply min duration filter to BD and DVD
authorJohn Stebbins <jstebbins.hb@gmail.com>
Sat, 19 Jan 2019 00:40:14 +0000 (16:40 -0800)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 22 Jan 2019 00:26:14 +0000 (16:26 -0800)
Fixes https://github.com/HandBrake/HandBrake/issues/1590

gtk/src/ghb.m4
libhb/batch.c
libhb/internal.h
libhb/scan.c

index 514403aae536410c44b6e3fc1ff3ac96b7423677..d9dea4c8ad5af58fd7264e9db09c466005d4afd3 100644 (file)
@@ -6572,7 +6572,7 @@ filter_output([
                           <object class="GtkLabel" id="label70">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">Filter short titles (seconds)</property>
+                            <property name="label" translatable="yes">Filter short DVD and Blu-ray titles (seconds)</property>
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
index 9af32393aacf373eef421b28df55af0c16c419e4..02c79893a2517aa7aad0f37152dd28d5016edc6d 100644 (file)
@@ -120,7 +120,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, uint64_t min_duration )
+hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t )
 {
 
     hb_title_t   * title;
@@ -145,11 +145,6 @@ hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t, uint64_t min_duration )
 
     title = hb_stream_title_scan( stream, title );
     hb_stream_close( &stream );
-    if( title != NULL && title->duration < min_duration )
-    {
-        hb_log( "batch: ignoring title (too short)" );
-        hb_title_close(&title);
-    }
 
     return title;
 }
index dde9083978223e430256d658d126c8a238e6e6b6..1284a1ff0c3defc03bcbff5b56d17268c6a5aa73 100644 (file)
@@ -303,8 +303,7 @@ typedef struct hb_batch_s hb_batch_t;
 hb_batch_t  * hb_batch_init( hb_handle_t *h, char * path );
 void          hb_batch_close( hb_batch_t ** _d );
 int           hb_batch_title_count( hb_batch_t * d );
-hb_title_t  * hb_batch_title_scan( hb_batch_t * d, int t,
-                                   uint64_t min_duration );
+hb_title_t  * hb_batch_title_scan( hb_batch_t * d, int t );
 
 /***********************************************************************
  * dvd.c
index a6c5d2eaec18986ecc07ebf4a9f26305def2dce9..b034acc886171b29d8e199a5f1f0e43dc6c62c0b 100644 (file)
@@ -155,7 +155,7 @@ static void ScanFunc( void * _data )
         if( data->title_index )
         {
             /* Scan this title only */
-            title = hb_batch_title_scan(data->batch, data->title_index, 0);
+            title = hb_batch_title_scan(data->batch, data->title_index);
             if ( title )
             {
                 hb_list_add( data->title_set->list_title, title );
@@ -169,8 +169,7 @@ static void ScanFunc( void * _data )
                 hb_title_t * title;
 
                 UpdateState1(data, i + 1);
-                title = hb_batch_title_scan(data->batch, i + 1,
-                                            data->min_title_duration);
+                title = hb_batch_title_scan(data->batch, i + 1);
                 if ( title != NULL )
                 {
                     hb_list_add( data->title_set->list_title, title );