changeset 35129:ce52aa2b4853

Quick fix for slices not working with some filter combinations.
author reimar
date Sat, 29 Sep 2012 20:16:48 +0000
parents 9ca71ecd9f48
children 46134abbcaea
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);