Commit 67cc7aaa authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avfilter/buffersrc: Use av_frame_clone() where appropriate

Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent 185d0acd
......@@ -230,17 +230,14 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
if (!(copy = av_frame_alloc()))
return AVERROR(ENOMEM);
if (refcounted && !(flags & AV_BUFFERSRC_FLAG_KEEP_REF)) {
if (!(copy = av_frame_alloc()))
return AVERROR(ENOMEM);
av_frame_move_ref(copy, frame);
} else {
ret = av_frame_ref(copy, frame);
if (ret < 0) {
av_frame_free(&copy);
return ret;
}
copy = av_frame_clone(frame);
if (!copy)
return AVERROR(ENOMEM);
}
#if FF_API_PKT_DURATION
......
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