OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / libhb / encavcodec.c
index 5cf8c50..22eb286 100644 (file)
@@ -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 ) )