summaryrefslogtreecommitdiff
path: root/libavcodec/libopenh264enc.c
diff options
context:
space:
mode:
authorLinjie Fu <linjie.fu@intel.com>2020-04-29 11:00:49 +0800
committerMartin Storsjö <martin@martin.st>2020-04-29 20:58:17 +0300
commit9310361252c88bcab74a7ccbe2c910c7a1a37397 (patch)
treee87d771fe4b5c5e7f5678c4ffdc1107572998304 /libavcodec/libopenh264enc.c
parent75fc3f97b0073d0ff57b4bd1e5ce8b36a5f9ac14 (diff)
downloadffmpeg-9310361252c88bcab74a7ccbe2c910c7a1a37397.tar.gz
lavc/libopenh264enc: prompt slice number changing inside libopenh264
Libopenh264enc would set the slice according to the number of cpu cores if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. Prompt a warning for user to catch this. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r--libavcodec/libopenh264enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index dc3bd536a8..29269f9513 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -244,6 +244,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
param.sSpatialLayers[0].sSliceCfg.uiSliceMode = s->slice_mode;
param.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceNum = avctx->slices;
#endif
+ if (avctx->slices == 0 && s->slice_mode == SM_FIXEDSLCNUM_SLICE)
+ av_log(avctx, AV_LOG_WARNING, "Slice count will be set automatically\n");
if (s->slice_mode == SM_SIZELIMITED_SLICE) {
if (s->max_nal_size) {