mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-08 17:11:08 +00:00
scale_d3d11: Fix hw_frame_ctx reference leak
This fixes #20995. The reference is taken twice and assigned to the same pointer (see above in the same function). Only the latter is needed.
(cherry picked from commit 66a8c37582)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
16b2049d4d
commit
90243e3985
@@ -341,13 +341,6 @@ static int scale_d3d11_config_props(AVFilterLink *outlink)
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
///< Propagate hw_frames_ctx to output
|
||||
outl->hw_frames_ctx = av_buffer_ref(inl->hw_frames_ctx);
|
||||
if (!outl->hw_frames_ctx) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Failed to propagate hw_frames_ctx to output\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
///< Initialize filter's hardware device context
|
||||
if (!s->hw_device_ctx) {
|
||||
AVHWFramesContext *in_frames_ctx = (AVHWFramesContext *)inl->hw_frames_ctx->data;
|
||||
@@ -395,6 +388,7 @@ static int scale_d3d11_config_props(AVFilterLink *outlink)
|
||||
return ret;
|
||||
}
|
||||
|
||||
///< Propagate hw_frames_ctx to output
|
||||
outl->hw_frames_ctx = av_buffer_ref(s->hw_frames_ctx_out);
|
||||
if (!outl->hw_frames_ctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
Reference in New Issue
Block a user