X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fhb.c;h=31b45c2df35d9ae41514a5e81a3221666e1c9b1e;hb=8425b4e14041ee668806cff29e458ae73bcd894f;hp=267c5b716d3c06540dbd570973733ac5a4aa744b;hpb=4318591edb12c04004d3c40dbab887b97279d770;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/hb.c b/libhb/hb.c index 267c5b71..31b45c2d 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -589,7 +589,7 @@ void hb_set_anamorphic_size( hb_job_t * job, if ( job->maxWidth && (job->maxWidth < job->width) ) width = job->maxWidth; - height = (double)width / storage_aspect; + height = ((double)width / storage_aspect) + 0.5; if ( job->maxHeight && (job->maxHeight < height) ) height = job->maxHeight; @@ -820,6 +820,34 @@ void hb_add( hb_handle_t * h, hb_job_t * job ) hb_list_add( title_copy->list_chapter, chapter_copy ); } + /* + * Copy the metadata + */ + if( title->metadata ) + { + title_copy->metadata = malloc( sizeof( hb_metadata_t ) ); + + if( title_copy->metadata ) + { + memcpy( title_copy->metadata, title->metadata, sizeof( hb_metadata_t ) ); + + /* + * Need to copy the artwork seperatly (TODO). + */ + if( title->metadata->coverart ) + { + title_copy->metadata->coverart = malloc( title->metadata->coverart_size ); + if( title_copy->metadata->coverart ) + { + memcpy( title_copy->metadata->coverart, title->metadata->coverart, + title->metadata->coverart_size ); + } else { + title_copy->metadata->coverart_size = 0; + } + } + } + } + /* Copy the audio track(s) we want */ title_copy->list_audio = hb_list_init();