# HG changeset patch # User reimar # Date 1348949808 0 # Node ID ce52aa2b4853ab25b11b5e2cce0c4a56b990beb4 # Parent 9ca71ecd9f48bb65a1096581a4921a6e6e0636c0 Quick fix for slices not working with some filter combinations. diff -r 9ca71ecd9f48 -r ce52aa2b4853 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Fri Sep 28 17:51:27 2012 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Sep 29 20:16:48 2012 +0000 @@ -582,7 +582,12 @@ if (IMGFMT_IS_HWACCEL(ctx->best_csp)) { type = MP_IMGTYPE_NUMBERED; - } else + } else if (avctx->has_b_frames) { + // HACK/TODO: slices currently do not work properly with B-frames, + // causing out-of-order frames or crashes with e.g. -vf scale,unsharp + // or -vf screenshot,unsharp. + flags &= ~MP_IMGFLAG_DRAW_CALLBACK; + } if (type == MP_IMGTYPE_IP || type == MP_IMGTYPE_IPB) { if(ctx->b_count>1 || ctx->ip_count>2){ mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_DRIFailure);