diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-07-14 18:18:57 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-07-20 20:47:46 +0200 |
commit | 2f155b18a10fec84163b3546efb41a8d64bb7c22 (patch) | |
tree | 27aafec449b0860ac3e3139c44c211100775e00b /fftools/ffmpeg_enc.c | |
parent | eda1fac27afdaaf646d9c84e6f2cea407764fbf2 (diff) | |
download | ffmpeg-2f155b18a10fec84163b3546efb41a8d64bb7c22.tar.gz |
fftools/ffmpeg: return an error from assert_avoptions() instead of aborting
Rename it to check_avoptions().
Diffstat (limited to 'fftools/ffmpeg_enc.c')
-rw-r--r-- | fftools/ffmpeg_enc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index d842bc7df4..96424272bf 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -407,7 +407,10 @@ int enc_open(OutputStream *ost, AVFrame *frame) ost->sq_idx_encode, ost->enc_ctx->frame_size); } - assert_avoptions(ost->encoder_opts); + ret = check_avoptions(ost->encoder_opts); + if (ret < 0) + return ret; + if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000 && ost->enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */) av_log(ost, AV_LOG_WARNING, "The bitrate parameter is set too low." |