fftools/ffmpeg: return an error from assert_avoptions() instead of aborting

Rename it to check_avoptions().
This commit is contained in:
Anton Khirnov
2023-07-14 18:18:57 +02:00
parent eda1fac27a
commit 2f155b18a1
5 changed files with 17 additions and 6 deletions

View File

@@ -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."