[FFmpeg-cvslog] avcodec/libuavs3d: Check ff_set_dimensions() for failure

Michael Niedermayer git at videolan.org
Wed Apr 6 21:34:06 EEST 2022


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Thu Feb 10 00:06:12 2022 +0100| [cc53ce7e5b009921ee80a5974cb978ef112f1148] | committer: Michael Niedermayer

avcodec/libuavs3d: Check ff_set_dimensions() for failure

Untested, no testcase

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit e88b99afdffce269e7a6a588948c4e00b86536f6)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/libuavs3d.c b/libavcodec/libuavs3d.c
index be03da39e2..59b50a2843 100644
--- a/libavcodec/libuavs3d.c
+++ b/libavcodec/libuavs3d.c
@@ -208,7 +208,9 @@ static int libuavs3d_decode_frame(AVCodecContext *avctx, void *data, int *got_fr
                 }
                 avctx->has_b_frames  = !seqh->low_delay;
                 avctx->pix_fmt = seqh->bit_depth_internal == 8 ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_YUV420P10LE;
-                ff_set_dimensions(avctx, seqh->horizontal_size, seqh->vertical_size);
+                ret = ff_set_dimensions(avctx, seqh->horizontal_size, seqh->vertical_size);
+                if (ret < 0)
+                    return ret;
                 h->got_seqhdr = 1;
 
                 if (seqh->colour_description) {



More information about the ffmpeg-cvslog mailing list