$NetBSD: patch-ve_x264,v 1.1 2009/10/18 22:22:10 ahoka Exp $

--- libmpcodecs/ve_x264.c.orig	2009-09-23 14:26:44.000000000 +0200
+++ libmpcodecs/ve_x264.c
@@ -198,8 +198,13 @@ static int control(struct vf_instance_s*
     h264_module_t *mod=(h264_module_t*)vf->priv;
     switch(request){
         case VFCTRL_FLUSH_FRAMES:
+#if X264_BUILD > 70
             while (x264_encoder_delayed_frames(mod->x264) > 0)
                 encode_frame(vf, NULL);
+#else
+	    if(param.i_bframe)
+		    while(encode_frame(vf, NULL) > 0);
+#endif
             return CONTROL_TRUE;
         default:
             return CONTROL_UNKNOWN;
