]> granicus.if.org Git - handbrake/commitdiff
decsrt: fix dropping of first srt when it's start time is 0
authorJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 9 Jun 2016 21:41:12 +0000 (15:41 -0600)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 9 Jun 2016 21:42:01 +0000 (15:42 -0600)
libhb/decsrtsub.c

index 1bfdb179b2570089f288dd6bfe7ae24653a1fd66..e4366f96b42bfaf7549aebc8376fa87e4ab20d30 100644 (file)
@@ -480,7 +480,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
                 uint64_t stop_time = ( pv->current_entry.stop +
                                        pv->subtitle->config.offset ) * 90;
 
-                if( !( start_time > pv->start_time && stop_time < pv->stop_time ) )
+                if( !( start_time >= pv->start_time && stop_time < pv->stop_time ) )
                 {
                     hb_deep_log( 3, "Discarding SRT at time start %"PRId64", stop %"PRId64, start_time, stop_time);
                     memset( &pv->current_entry, 0, sizeof( srt_entry_t ) );
@@ -546,7 +546,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
         uint64_t stop_time = ( pv->current_entry.stop +
                                pv->subtitle->config.offset ) * 90;
 
-        if( !( start_time > pv->start_time && stop_time < pv->stop_time ) )
+        if( !( start_time >= pv->start_time && stop_time < pv->stop_time ) )
         {
             hb_deep_log( 3, "Discarding SRT at time start %"PRId64", stop %"PRId64, start_time, stop_time);
             memset( &pv->current_entry, 0, sizeof( srt_entry_t ) );