av_frame_copy() is allowed to return values >= 0 on success, whereas
the documentation of av_frame_ref() states that the return value is 0 on
success. Ergo the latter must not just return the former's return value.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
---
 libavutil/frame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 31a2117b82..fefb2b69c0 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -469,7 +469,7 @@ int av_frame_ref(AVFrame *dst, const AVFrame *src)
         if (ret < 0)
             goto fail;
 
-        return ret;
+        return 0;
     }
 
     /* ref the buffers */
-- 
2.27.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to