]> granicus.if.org Git - handbrake/commitdiff
batch: fix crash when a stream scan fails
authorJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 28 Mar 2017 19:19:01 +0000 (13:19 -0600)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 28 Mar 2017 19:19:01 +0000 (13:19 -0600)
libhb/batch.c

index cc7808e6c8920c9b447105651080fb21376a8e01..bab7ab9833930fbdfd92222947590e6032fa142e 100644 (file)
@@ -139,7 +139,7 @@ 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->duration < min_duration )
+    if( title != NULL && title->duration < min_duration )
     {
         hb_log( "batch: ignoring title (too short)" );
         hb_title_close(&title);