Message ID | AS8P250MB074478E14CD460105F3A0C608F152@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Commit | 67c7c44c7956c4ecde0d36652f3d34bca13bffdb |
Headers | show |
Series | [FFmpeg-devel] avcodec/vp8: Return error on error | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
Hi, On Sat, Apr 27, 2024 at 7:47 AM Andreas Rheinhardt < andreas.rheinhardt@outlook.com> wrote: > Regression since e1ba00ac8f755f37ebc8448d3dbea906d7b79da2. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavcodec/vp8.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c > index f37938ad27..19f32b3400 100644 > --- a/libavcodec/vp8.c > +++ b/libavcodec/vp8.c > @@ -107,8 +107,11 @@ static int vp8_alloc_frame(VP8Context *s, VP8Frame > *f, int ref) > ref ? AV_GET_BUFFER_FLAG_REF : > 0); > if (ret < 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; > -- > 2.40.1 > OK. Ronald
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index f37938ad27..19f32b3400 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -107,8 +107,11 @@ static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref) ref ? AV_GET_BUFFER_FLAG_REF : 0); if (ret < 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;
Regression since e1ba00ac8f755f37ebc8448d3dbea906d7b79da2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/vp8.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)