diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
commit | 95da34aa071d64b21ef3e952b987ba3dcee84ca0 (patch) | |
tree | eabf4399e40fd270714c53d40688eadadfd4c5ff /libmpcodecs/ve_x264.c | |
parent | f394231f5de9d1ff679f1b2da4d1f1b303ae914a (diff) | |
parent | 3961e12fca2f1ec10c64e3ff298828feecca52c9 (diff) | |
download | mpv-95da34aa071d64b21ef3e952b987ba3dcee84ca0.tar.bz2 mpv-95da34aa071d64b21ef3e952b987ba3dcee84ca0.tar.xz |
Merge svn changes up to r29532
Diffstat (limited to 'libmpcodecs/ve_x264.c')
-rw-r--r-- | libmpcodecs/ve_x264.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index 51da237169..3a909cdfb7 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -218,9 +218,11 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, in static int control(struct vf_instance* vf, int request, void *data) { h264_module_t *mod=(h264_module_t*)vf->priv; + int count = 256; // giant HACK, x264_encoder_encode may incorrectly return 0 + // when threads > 1 and delayed frames pending switch(request){ case VFCTRL_FLUSH_FRAMES: - if(param.i_bframe) + while(encode_frame(vf, NULL) == 0 && --count); while(encode_frame(vf, NULL) > 0); return CONTROL_TRUE; default: |