]> granicus.if.org Git - handbrake/commitdiff
- allow titles with video but no audio.
authorvan <vanj.hb@gmail.com>
Tue, 2 Dec 2008 20:53:00 +0000 (20:53 +0000)
committervan <vanj.hb@gmail.com>
Tue, 2 Dec 2008 20:53:00 +0000 (20:53 +0000)
 - don't throw away previews just because we hit eof while trying to find audio info.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1993 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/scan.c

index 26927ffbca90b5df271302447cdadc1584ddab38..631fa43ef0cfe84f1becd028171204bb683089f6 100644 (file)
@@ -168,15 +168,6 @@ static void ScanFunc( void * _data )
             j++;
         }
 
-        /* If we don't have any audio streams left, remove the title */
-        if( !hb_list_count( title->list_audio ) )
-        {
-            hb_log("scan: ignoring title %i, no audio tracks found", title->index );
-            hb_list_rem( data->list_title, title );
-            free( title );
-            continue;
-        }
-
         i++;
     }
 
@@ -463,6 +454,10 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
             {
               if ( !hb_stream_read(data->stream,buf_ps) )
               {
+                  if ( vid_buf )
+                  {
+                    break;
+                  }
                   hb_log( "Warning: Could not read data for preview %d, skipped", i + 1 );
                   goto skip_preview;
               }