]> git.sesse.net Git - ffmpeg/commitdiff
avutil/frame: Return 0 on success in av_frame_ref()
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Thu, 1 Apr 2021 21:04:19 +0000 (23:04 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Mon, 5 Apr 2021 16:36:51 +0000 (18:36 +0200)
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.rheinhardt@outlook.com>
libavutil/frame.c

index 31a2117b82aa02afcc553dded8208a302f9e63d0..fefb2b69c04226b747fa4e831198c2db7bf84d03 100644 (file)
@@ -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 */