Commit 2a3cb1cf authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  Use av_frame_copy() to simplify code where appropriate.

Conflicts:
	libavfilter/vf_copy.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 7a9946d3 30517a9f
......@@ -161,9 +161,7 @@ static int libwebp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
ret = av_frame_get_buffer(alt_frame, 32);
if (ret < 0)
goto end;
av_image_copy(alt_frame->data, alt_frame->linesize,
frame->data, frame->linesize,
avctx->pix_fmt, frame->width, frame->height);
av_frame_copy(alt_frame, frame);
frame = alt_frame;
}
pic->use_argb = 0;
......
......@@ -37,9 +37,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return AVERROR(ENOMEM);
}
av_frame_copy_props(out, in);
av_image_copy(out->data, out->linesize, (const uint8_t**) in->data, in->linesize,
in->format, in->width, in->height);
av_frame_copy(out, in);
av_frame_free(&in);
return ff_filter_frame(outlink, out);
}
......
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