There are no failure cases left in this function.
Unified · Split
| @@ -864,7 +864,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) · 863 unmodified lines | ||
| 864 | 864 | } |
| 865 | 865 | |
| 866 | 866 | /* export coded and cropped frame dimensions to AVCodecContext */ |
| 867 | −static int init_dimensions(H264Context *h) | |
| 867 | +static void init_dimensions(H264Context *h) | |
| 868 | 868 | { |
| 869 | 869 | const SPS *sps = (const SPS*)h->ps.sps; |
| 870 | 870 | int cr = sps->crop_right; |
| @@ -902,8 +902,6 @@ static int init_dimensions(H264Context *h) · 31 unmodified lines | ||
| 902 | 902 | h->crop_left = cl; |
| 903 | 903 | h->crop_top = ct; |
| 904 | 904 | h->crop_bottom = cb; |
| 905 | − | |
| 906 | − return 0; | |
| 907 | 905 | } |
| 908 | 906 | |
| 909 | 907 | static int h264_slice_header_init(H264Context *h) |
| @@ -1068,9 +1066,7 @@ static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl · 158 unmodified lines | ||
| 1068 | 1066 | h->width = 16 * h->mb_width; |
| 1069 | 1067 | h->height = 16 * h->mb_height; |
| 1070 | 1068 | |
| 1071 | − ret = init_dimensions(h); | |
| 1072 | − if (ret < 0) | |
| 1073 | − return ret; | |
| 1069 | + init_dimensions(h); | |
| 1074 | 1070 | |
| 1075 | 1071 | if (sps->video_signal_type_present_flag) { |
| 1076 | 1072 | h->avctx->color_range = sps->full_range > 0 ? AVCOL_RANGE_JPEG |