[FFmpeg-cvslog] avutil/frame: remove one layer of indirection in av_frame_replace()

James Almer git at videolan.org
Thu May 18 17:52:40 EEST 2023


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu May 18 11:49:02 2023 -0300| [4adb6da7a6fc504a453c0d34cddcda2923b9590d] | committer: James Almer

avutil/frame: remove one layer of indirection in av_frame_replace()

And don't force copy side data.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4adb6da7a6fc504a453c0d34cddcda2923b9590d
---

 libavutil/frame.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 4a0647cc60..b6cee2d886 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -494,7 +494,9 @@ int av_frame_replace(AVFrame *dst, const AVFrame *src)
             || src->data[2] || src->data[3])
             return av_frame_ref(dst, src);
 
-        return av_frame_copy_props(dst, src);
+        ret = frame_copy_props(dst, src, 0);
+        if (ret < 0)
+            goto fail;
     }
 
     dst->format         = src->format;



More information about the ffmpeg-cvslog mailing list