OSDN Git Service

Allow dvd sources that have no audio
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 14 Sep 2009 16:00:43 +0000 (16:00 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 14 Sep 2009 16:00:43 +0000 (16:00 +0000)
Removed the code that dropped titles if there was no audio.
Do not add a default audio track in the CLI if there are no audios in the source

git-svn-id: svn://localhost/HandBrake/trunk@2822 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/dvd.c
libhb/dvdnav.c
test/test.c

index 39b519d..fa5373e 100644 (file)
@@ -421,12 +421,6 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t )
         hb_list_add( title->list_audio, audio );
     }
 
-    if( !hb_list_count( title->list_audio ) )
-    {
-        hb_log( "scan: ignoring title (no audio track)" );
-        goto fail;
-    }
-
     memcpy( title->palette,
             vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
             16 * sizeof( uint32_t ) );
index 4633f1c..d525b96 100644 (file)
@@ -588,12 +588,6 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t )
         hb_list_add( title->list_audio, audio );
     }
 
-    if( !hb_list_count( title->list_audio ) )
-    {
-        hb_log( "scan: ignoring title (no audio track)" );
-        goto fail;
-    }
-
     memcpy( title->palette,
             ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
             16 * sizeof( uint32_t ) );
index 54d7631..81543c3 100644 (file)
@@ -1382,7 +1382,8 @@ static int HandleEvents( hb_handle_t * h )
                 }
             }
 
-            if( hb_list_count(audios) == 0 )
+            if( hb_list_count(audios) == 0 &&
+                hb_list_count(job->title->list_audio) > 0 )
             {        
                 /* Create a new audio track with default settings */
                 audio = calloc(1, sizeof(*audio));