diff mbox series

[FFmpeg-devel,10/18] h264dec: do not return a value from init_dimensions()

Message ID 20200313102850.23913-10-anton@khirnov.net
State Accepted
Headers show
Series [FFmpeg-devel,01/18] mpeg4videodec: do not copy a range of fields at once
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork warning Failed to apply patch

Commit Message

Anton Khirnov March 13, 2020, 10:28 a.m. UTC
There are no failure cases left in this function.
---
 libavcodec/h264_slice.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Michael Niedermayer March 13, 2020, 10:30 p.m. UTC | #1
On Fri, Mar 13, 2020 at 11:28:42AM +0100, Anton Khirnov wrote:
> There are no failure cases left in this function.
> ---
>  libavcodec/h264_slice.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

untested but LGTM

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index e24d41ca50..ed4f711ac5 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -865,7 +865,7 @@  static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
 }
 
 /* export coded and cropped frame dimensions to AVCodecContext */
-static int init_dimensions(H264Context *h)
+static void init_dimensions(H264Context *h)
 {
     const SPS *sps = (const SPS*)h->ps.sps;
     int cr = sps->crop_right;
@@ -903,8 +903,6 @@  static int init_dimensions(H264Context *h)
     h->crop_left           = cl;
     h->crop_top            = ct;
     h->crop_bottom         = cb;
-
-    return 0;
 }
 
 static int h264_slice_header_init(H264Context *h)
@@ -1069,9 +1067,7 @@  static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl
         h->width  = 16 * h->mb_width;
         h->height = 16 * h->mb_height;
 
-        ret = init_dimensions(h);
-        if (ret < 0)
-            return ret;
+        init_dimensions(h);
 
         if (sps->video_signal_type_present_flag) {
             h->avctx->color_range = sps->full_range > 0 ? AVCOL_RANGE_JPEG