diff options
author | Angie Chiang <angiebird@google.com> | 2021-01-19 18:56:48 -0800 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2021-01-20 17:52:35 -0800 |
commit | b0050f27e27c59312a12c037b263a1bb71df4f3c (patch) | |
tree | 16e6474648dea00cd69899b69b5f8180957a8309 /vp9/encoder | |
parent | f57fa3f1df45ea80049ff831a054ac66a12aebdc (diff) | |
download | libvpx-b0050f27e27c59312a12c037b263a1bb71df4f3c.tar libvpx-b0050f27e27c59312a12c037b263a1bb71df4f3c.tar.gz libvpx-b0050f27e27c59312a12c037b263a1bb71df4f3c.tar.bz2 libvpx-b0050f27e27c59312a12c037b263a1bb71df4f3c.zip |
Use VPX_CODEC_INVALID_PARAM when ext_ratectrl=NULL
Bug: webm:1716
Change-Id: Ic60c367aabfc03d94816e85476895b988aced5f1
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_ext_ratectrl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_ext_ratectrl.c b/vp9/encoder/vp9_ext_ratectrl.c index 70d6dd9c2..a27eb653b 100644 --- a/vp9/encoder/vp9_ext_ratectrl.c +++ b/vp9/encoder/vp9_ext_ratectrl.c @@ -15,7 +15,7 @@ vpx_codec_err_t vp9_extrc_init(EXT_RATECTRL *ext_ratectrl) { if (ext_ratectrl == NULL) { - return VPX_CODEC_ERROR; + return VPX_CODEC_INVALID_PARAM; } vp9_zero(*ext_ratectrl); return VPX_CODEC_OK; @@ -27,7 +27,7 @@ vpx_codec_err_t vp9_extrc_create(vpx_rc_funcs_t funcs, vpx_rc_status_t rc_status; vpx_rc_firstpass_stats_t *rc_firstpass_stats; if (ext_ratectrl == NULL) { - return VPX_CODEC_ERROR; + return VPX_CODEC_INVALID_PARAM; } vp9_extrc_delete(ext_ratectrl); ext_ratectrl->funcs = funcs; @@ -52,7 +52,7 @@ vpx_codec_err_t vp9_extrc_create(vpx_rc_funcs_t funcs, vpx_codec_err_t vp9_extrc_delete(EXT_RATECTRL *ext_ratectrl) { if (ext_ratectrl == NULL) { - return VPX_CODEC_ERROR; + return VPX_CODEC_INVALID_PARAM; } if (ext_ratectrl->ready) { vpx_rc_status_t rc_status = @@ -97,7 +97,7 @@ static void gen_rc_firstpass_stats(const FIRSTPASS_STATS *stats, vpx_codec_err_t vp9_extrc_send_firstpass_stats( EXT_RATECTRL *ext_ratectrl, const FIRST_PASS_INFO *first_pass_info) { if (ext_ratectrl == NULL) { - return VPX_CODEC_ERROR; + return VPX_CODEC_INVALID_PARAM; } if (ext_ratectrl->ready) { vpx_rc_status_t rc_status; @@ -141,7 +141,7 @@ vpx_codec_err_t vp9_extrc_get_encodeframe_decision( RefCntBuffer *ref_frame_bufs[MAX_INTER_REF_FRAMES], int ref_frame_flags, vpx_rc_encodeframe_decision_t *encode_frame_decision) { if (ext_ratectrl == NULL) { - return VPX_CODEC_ERROR; + return VPX_CODEC_INVALID_PARAM; } if (ext_ratectrl->ready) { vpx_rc_status_t rc_status; @@ -170,7 +170,7 @@ vpx_codec_err_t vp9_extrc_update_encodeframe_result( const YV12_BUFFER_CONFIG *coded_frame, uint32_t bit_depth, uint32_t input_bit_depth) { if (ext_ratectrl == NULL) { - return VPX_CODEC_ERROR; + return VPX_CODEC_INVALID_PARAM; } if (ext_ratectrl->ready) { PSNR_STATS psnr; |