OSDN Git Service

libhb: remove duplicate title detection from scan
[handbrake-jp/handbrake-jp-git.git] / libhb / detelecine.c
index a305cb4..5262b61 100644 (file)
@@ -1,5 +1,5 @@
 #include "hb.h"
-#include "libavcodec/avcodec.h"
+#include "hbffmpeg.h"
 #include "mpeg2dec/mpeg2.h"
 
 /*
@@ -567,15 +567,17 @@ void pullup_free_context( struct pullup_context * c )
 
     free( c->buffers );
 
-    f = c->head;
-    do
+    f = c->head->next;
+    while( f != c->head )
     {
         free( f->diffs );
         free( f->comb );
         f = f->next;
         free( f->prev );
     }
-    while( f != c->head );
+    free( f->diffs );
+    free( f->comb );
+    free(f);
 
     free( c->frame );
     free( c );
@@ -827,8 +829,7 @@ hb_filter_private_t * hb_detelecine_init( int pix_fmt,
     pv->width[1]  = pv->width[2] = width >> 1;
     pv->height[1] = pv->height[2] = height >> 1;
 
-    int buf_size = 3 * width * height / 2;
-    pv->buf_out = hb_buffer_init( buf_size );
+    pv->buf_out = hb_video_buffer_init( width, height );
 
     struct pullup_context * ctx;
     pv->pullup_ctx = ctx = pullup_alloc_context();