diff options
author | jstebbins <[email protected]> | 2010-09-28 22:10:49 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-09-28 22:10:49 +0000 |
commit | 03b2ce0e91c4e4ed44445a075ef5f35bc052b5b8 (patch) | |
tree | 24a1def4ca91cba98676508c6a3b1482ba131cb5 /test/test.c | |
parent | f1997be4ed1dd373316ac842685f18a6f8ab05ba (diff) |
SSA subtitle burn in
Anime fans rejoice! This patch adds SSA subtitle burn-in support with libass.
Therefore SSA subtitles should now be rendered in full quality, with the
appropriate embedded fonts and positioning information.
Thanks to davidfstr
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3557 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test/test.c')
-rw-r--r-- | test/test.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/test/test.c b/test/test.c index cff30ef4b..f5fb9ec57 100644 --- a/test/test.c +++ b/test/test.c @@ -440,10 +440,11 @@ static void PrintTitleInfo( hb_title_t * title ) for( i = 0; i < hb_list_count( title->list_subtitle ); i++ ) { subtitle = hb_list_item( title->list_subtitle, i ); - fprintf( stderr, " + %d, %s (iso639-2: %s) (%s)\n", + fprintf( stderr, " + %d, %s (iso639-2: %s) (%s)(%s)\n", i + 1, subtitle->lang, subtitle->iso639_2, - (subtitle->format == TEXTSUB) ? "Text" : "Bitmap"); + (subtitle->format == TEXTSUB) ? "Text" : "Bitmap", + hb_subsource_name(subtitle->source)); } if(title->detected_interlacing) @@ -1857,12 +1858,12 @@ static int HandleEvents( hb_handle_t * h ) } force = test_sub_list(subforce, token, pos); - - if ( !burn && subtitle->format == PICTURESUB) - { - sub_config.dest = PASSTHRUSUB; - } - else if ( burn && subtitle->format == PICTURESUB ) + + int supports_burn = + ( subtitle->source == VOBSUB ) || + ( subtitle->source == SSASUB ); + + if ( burn && supports_burn ) { // Only allow one subtitle to be burned into video if ( sub_burned ) @@ -1871,6 +1872,13 @@ static int HandleEvents( hb_handle_t * h ) continue; } sub_burned = 1; + + // Mark as burn-in + sub_config.dest = RENDERSUB; + } + else + { + sub_config.dest = PASSTHRUSUB; } sub_config.force = force; sub_config.default_track = def; |