]> 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>
Mon, 11 Feb 2019 18:01:25 +0000 (11:01 -0700)
Fixes https://github.com/HandBrake/HandBrake/issues/1590

(cherry picked from commit a4f27a449479afbd69b96bb52f36ddd5a00b8e04)

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

index 5aa339cb1a2e6d7e48f7cd880f5f616222a0e368..50a70e0f5298d56ad67dfc7e22493e64ffd49252 100644 (file)
@@ -7514,7 +7514,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 2554cdffa701cd319fea8422b08d9385bdcd588e..cef1c2ebbf2f4ab55d32dc7db3ffa0c6d20d2914 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 84566558ff008c3367d6b7082a0218062f89722c..e2e7e2f51e0281cb3441fd9c8ee75def12a58043 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 );