Commit 7071924c authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit 'fdfe0136'

* commit 'fdfe0136':
  hwcontext: allocate the destination frame for the pool size
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents 72c38dd6 fdfe0136
......@@ -321,6 +321,7 @@ int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ref,
static int transfer_data_alloc(AVFrame *dst, const AVFrame *src, int flags)
{
AVHWFramesContext *ctx = (AVHWFramesContext*)src->hw_frames_ctx->data;
AVFrame *frame_tmp;
int ret = 0;
......@@ -343,8 +344,8 @@ static int transfer_data_alloc(AVFrame *dst, const AVFrame *src, int flags)
frame_tmp->format = formats[0];
av_freep(&formats);
}
frame_tmp->width = src->width;
frame_tmp->height = src->height;
frame_tmp->width = ctx->width;
frame_tmp->height = ctx->height;
ret = av_frame_get_buffer(frame_tmp, 32);
if (ret < 0)
......@@ -354,6 +355,9 @@ static int transfer_data_alloc(AVFrame *dst, const AVFrame *src, int flags)
if (ret < 0)
goto fail;
frame_tmp->width = src->width;
frame_tmp->height = src->height;
av_frame_move_ref(dst, frame_tmp);
fail:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment