# HG changeset patch # User arpi # Date 1018747273 0 # Node ID 481592004427f6131934b69a18e4634d1146e96a # Parent 027568c0f982a407dd6e2bfd7050e5a823bee02b draw_slices with framedrop fixed diff -r 027568c0f982 -r 481592004427 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Sun Apr 14 01:20:26 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sun Apr 14 01:21:13 2002 +0000 @@ -147,7 +147,8 @@ if(len<=0) return NULL; // skipped frame - if(ctx->vo_inited && !ctx->convert){ + avctx->draw_horiz_band=NULL; + if(ctx->vo_inited && !ctx->convert && !(flags&3)){ mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE | (ctx->do_slices?MP_IMGFLAG_DRAW_CALLBACK:0), sh->disp_w, sh->disp_h); @@ -155,8 +156,7 @@ // vd core likes slices! avctx->draw_horiz_band=draw_slice; avctx->opaque=sh->video_out; - } else - avctx->draw_horiz_band=NULL; + } } ret = avcodec_decode_video(avctx, &lavc_picture, diff -r 027568c0f982 -r 481592004427 libmpcodecs/vd_libmpeg2.c --- a/libmpcodecs/vd_libmpeg2.c Sun Apr 14 01:20:26 2002 +0000 +++ b/libmpcodecs/vd_libmpeg2.c Sun Apr 14 01:21:13 2002 +0000 @@ -154,7 +154,7 @@ mp_image_t* mpi; int flags; if (picture->picture_coding_type == B_TYPE){ - flags=vd_use_slices?MP_IMGFLAG_DRAW_CALLBACK:0; + flags=(!framedrop && vd_use_slices)?MP_IMGFLAG_DRAW_CALLBACK:0; picture->display_frame= picture->current_frame = picture->temp_frame; } else {