OSDN Git Service

x264 bump to r1101
[handbrake-jp/handbrake-jp-git.git] / libhb / decmpeg2.c
index e0387dd..83c36f6 100644 (file)
@@ -5,10 +5,8 @@
    It may be used under the terms of the GNU General Public License. */
 
 #include "hb.h"
-
+#include "hbffmpeg.h"
 #include "mpeg2dec/mpeg2.h"
-#include "libavcodec/avcodec.h"
-#include "libswscale/swscale.h"
 
 /* Cadence tracking */
 #ifndef PIC_FLAG_REPEAT_FIRST_FIELD
@@ -75,7 +73,7 @@ static hb_buffer_t *hb_copy_frame( hb_job_t *job, int width, int height,
         dst_h = job->title->height;
     }
     int dst_wh = dst_w * dst_h;
-    hb_buffer_t *buf  = hb_buffer_init( dst_wh + ( dst_wh >> 1 ) );
+    hb_buffer_t *buf  = hb_video_buffer_init( dst_w, dst_h );
 
     if ( dst_w != width || dst_h != height )
     {