[FFmpeg-cvslog] Merge commit 'e62ff72fc1052273deb708ba715f73e5187281d4'
Clément Bœsch
git at videolan.org
Wed Jun 22 19:31:36 CEST 2016
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Wed Jun 22 19:29:56 2016 +0200| [d4b1b3b06c210be9088eb0940acca0a914b6b916] | committer: Clément Bœsch
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 at pkh.me>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4b1b3b06c210be9088eb0940acca0a914b6b916
---
libavcodec/utils.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 54a3e87..f7adb52 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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])
======================================================================
More information about the ffmpeg-cvslog
mailing list