X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fencavcodec.c;h=22eb286d524158c8e300c04d8f5143f623e7bfaa;hb=4b72a63eb61a01275493c4bfb51ba02152d1c5e1;hp=d22d30d3de02cabca76e2d2aecdf47e35515c575;hpb=5846d37d995f4b03815c58b736305d6e7f8c51ce;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index d22d30d3..22eb286d 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -5,8 +5,7 @@ It may be used under the terms of the GNU General Public License. */ #include "hb.h" - -#include "libavcodec/avcodec.h" +#include "hbffmpeg.h" struct hb_work_private_s { @@ -107,13 +106,13 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) context->gop_size = 10 * job->vrate / job->vrate_base; context->pix_fmt = PIX_FMT_YUV420P; - if( job->pixel_ratio ) + if( job->anamorphic.mode ) { - context->sample_aspect_ratio.num = job->pixel_aspect_width; - context->sample_aspect_ratio.den = job->pixel_aspect_height; + context->sample_aspect_ratio.num = job->anamorphic.par_width; + context->sample_aspect_ratio.den = job->anamorphic.par_height; hb_log( "encavcodec: encoding with stored aspect %d/%d", - job->pixel_aspect_width, job->pixel_aspect_height ); + job->anamorphic.par_width, job->anamorphic.par_height ); } if( job->mux & ( HB_MUX_MP4 | HB_MUX_PSP ) ) @@ -159,7 +158,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) } } - if( avcodec_open( context, codec ) ) + if( hb_avcodec_open( context, codec ) ) { hb_log( "hb_work_encavcodec_init: avcodec_open failed" ); } @@ -194,7 +193,7 @@ void encavcodecClose( hb_work_object_t * w ) { hb_deep_log( 2, "encavcodec: closing libavcodec" ); avcodec_flush_buffers( pv->context ); - avcodec_close( pv->context ); + hb_avcodec_close( pv->context ); } if( pv->file ) {