[FFmpeg-cvslog] avcodec/vp8: Return error on error
Andreas Rheinhardt
git at videolan.org
Sat May 25 03:13:37 EEST 2024
ffmpeg | branch: release/7.0 | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Apr 27 12:24:05 2024 +0200| [7050b247b28a117c099da3198a5d5dd64b4a23a4] | committer: Andreas Rheinhardt
avcodec/vp8: Return error on error
Regression since e1ba00ac8f755f37ebc8448d3dbea906d7b79da2.
Reviewed-by: Ronald S. Bultje <rsbultje at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
(cherry picked from commit 67c7c44c7956c4ecde0d36652f3d34bca13bffdb)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7050b247b28a117c099da3198a5d5dd64b4a23a4
---
libavcodec/vp8.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 3ebf1c2df9..a9f519d7b8 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -106,8 +106,11 @@ static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref)
if ((ret = ff_thread_get_ext_buffer(s->avctx, &f->tf,
ref ? AV_GET_BUFFER_FLAG_REF : 0)) < 0)
return ret;
- if (!(f->seg_map = ff_refstruct_allocz(s->mb_width * s->mb_height)))
+ f->seg_map = ff_refstruct_allocz(s->mb_width * s->mb_height);
+ if (!f->seg_map) {
+ ret = AVERROR(ENOMEM);
goto fail;
+ }
ret = ff_hwaccel_frame_priv_alloc(s->avctx, &f->hwaccel_picture_private);
if (ret < 0)
goto fail;
More information about the ffmpeg-cvslog
mailing list