mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Merge commit 'e62ff72fc1052273deb708ba715f73e5187281d4'
* commit 'e62ff72fc1052273deb708ba715f73e5187281d4': lavc: make avcodec_open2() fail when the timebase is not set for encoding Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
commit
d4b1b3b06c
@ -1412,6 +1412,13 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
if (avctx->time_base.num <= 0 || avctx->time_base.den <= 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "The encoder timebase is not set.\n");
|
||||
ret = AVERROR(EINVAL);
|
||||
goto free_and_end;
|
||||
}
|
||||
|
||||
if (avctx->codec->sample_fmts) {
|
||||
for (i = 0; avctx->codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) {
|
||||
if (avctx->sample_fmt == avctx->codec->sample_fmts[i])
|
||||
|
Loading…
x
Reference in New Issue
Block a user