OSDN Git Service

Workaround from "van" to prevent double chapter markers when using advanced deinterla...
[handbrake-jp/handbrake-jp-git.git] / libhb / deinterlace.c
index a6d3832..2d35ecf 100644 (file)
@@ -65,7 +65,7 @@ hb_filter_private_t * hb_deinterlace_init( int pix_fmt,
                                            int height,\r
                                            char * settings );\r
 \r
-int hb_deinterlace_work( const hb_buffer_t * buf_in,\r
+int hb_deinterlace_work( hb_buffer_t * buf_in,\r
                          hb_buffer_t ** buf_out,\r
                          int pix_fmt,\r
                          int width, \r
@@ -497,7 +497,7 @@ void hb_deinterlace_close( hb_filter_private_t * pv )
     free( pv );\r
 }\r
 \r
-int hb_deinterlace_work( const hb_buffer_t * buf_in,\r
+int hb_deinterlace_work( hb_buffer_t * buf_in,\r
                          hb_buffer_t ** buf_out,\r
                          int pix_fmt,\r
                          int width, \r
@@ -551,6 +551,9 @@ int hb_deinterlace_work( const hb_buffer_t * buf_in,
         yadif_store_ref( (const uint8_t**)pv->pic_in.data, pv );\r
         \r
         hb_buffer_copy_settings( pv->buf_settings, buf_in );\r
+
+        /* don't let 'work_loop' send a chapter mark upstream */
+        buf_in->new_chap  = 0;
 \r
         pv->yadif_ready = 1;\r
         \r
@@ -588,6 +591,9 @@ int hb_deinterlace_work( const hb_buffer_t * buf_in,
     \r
     /* Replace buffered settings with input buffer settings */\r
     hb_buffer_copy_settings( pv->buf_settings, buf_in );    \r
+
+    /* don't let 'work_loop' send a chapter mark upstream */
+    buf_in->new_chap  = 0;
 \r
     return FILTER_OK;\r
 }\r