1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

h264dec: do not return a value from init_dimensions()

There are no failure cases left in this function.
This commit is contained in:
Anton Khirnov 2017-04-17 10:40:55 +02:00
parent 1b17988cb5
commit e38b8b0dc6

View File

@ -864,7 +864,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
} }
/* export coded and cropped frame dimensions to AVCodecContext */ /* 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; const SPS *sps = (const SPS*)h->ps.sps;
int cr = sps->crop_right; int cr = sps->crop_right;
@ -902,8 +902,6 @@ static int init_dimensions(H264Context *h)
h->crop_left = cl; h->crop_left = cl;
h->crop_top = ct; h->crop_top = ct;
h->crop_bottom = cb; h->crop_bottom = cb;
return 0;
} }
static int h264_slice_header_init(H264Context *h) 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
h->width = 16 * h->mb_width; h->width = 16 * h->mb_width;
h->height = 16 * h->mb_height; h->height = 16 * h->mb_height;
ret = init_dimensions(h); init_dimensions(h);
if (ret < 0)
return ret;
if (sps->video_signal_type_present_flag) { if (sps->video_signal_type_present_flag) {
h->avctx->color_range = sps->full_range > 0 ? AVCOL_RANGE_JPEG h->avctx->color_range = sps->full_range > 0 ? AVCOL_RANGE_JPEG