diff options
Diffstat (limited to 'contrib/ffmpeg/A22-qsv-scale-fix-green-stripes.patch')
-rw-r--r-- | contrib/ffmpeg/A22-qsv-scale-fix-green-stripes.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A22-qsv-scale-fix-green-stripes.patch b/contrib/ffmpeg/A22-qsv-scale-fix-green-stripes.patch new file mode 100644 index 000000000..15170fa50 --- /dev/null +++ b/contrib/ffmpeg/A22-qsv-scale-fix-green-stripes.patch @@ -0,0 +1,35 @@ +diff --git a/libavfilter/vf_scale_qsv.c b/libavfilter/vf_scale_qsv.c +index 82bb64eb42..2691d1a1fa 100644 +--- a/libavfilter/vf_scale_qsv.c ++++ b/libavfilter/vf_scale_qsv.c +@@ -280,7 +280,7 @@ static mfxStatus frame_get_hdl(mfxHDL pthis, mfxMemId mid, mfxHDL *hdl) + return MFX_ERR_NONE; + } + +-static int init_out_session(AVFilterContext *ctx) ++static int init_out_session(AVFilterContext *ctx, int in_width, int in_height) + { + + QSVScaleContext *s = ctx->priv; +@@ -395,8 +395,11 @@ static int init_out_session(AVFilterContext *ctx) + sizeof(*s->mem_ids_in)); + if (!s->mem_ids_in) + return AVERROR(ENOMEM); +- for (i = 0; i < in_frames_hwctx->nb_surfaces; i++) ++ for (i = 0; i < in_frames_hwctx->nb_surfaces; i++) { ++ in_frames_hwctx->surfaces[i].Info.CropW = in_width; ++ in_frames_hwctx->surfaces[i].Info.CropH = in_height; + s->mem_ids_in[i] = in_frames_hwctx->surfaces[i].Data.MemId; ++ } + s->nb_mem_ids_in = in_frames_hwctx->nb_surfaces; + + s->mem_ids_out = av_mallocz_array(out_frames_hwctx->nb_surfaces, +@@ -460,7 +463,7 @@ static int init_scale_session(AVFilterContext *ctx, int in_width, int in_height, + if (ret < 0) + return ret; + +- ret = init_out_session(ctx); ++ ret = init_out_session(ctx, in_width, in_height); + if (ret < 0) + return ret; + |