mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/buffersrc: Use av_frame_clone() where appropriate
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
185d0acdc7
commit
67cc7aaa51
|
@ -230,17 +230,14 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
|
||||
}
|
||||
|
||||
if (refcounted && !(flags & AV_BUFFERSRC_FLAG_KEEP_REF)) {
|
||||
if (!(copy = av_frame_alloc()))
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (refcounted && !(flags & AV_BUFFERSRC_FLAG_KEEP_REF)) {
|
||||
av_frame_move_ref(copy, frame);
|
||||
} else {
|
||||
ret = av_frame_ref(copy, frame);
|
||||
if (ret < 0) {
|
||||
av_frame_free(©);
|
||||
return ret;
|
||||
}
|
||||
copy = av_frame_clone(frame);
|
||||
if (!copy)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
#if FF_API_PKT_DURATION
|
||||
|
|
Loading…
Reference in New Issue