mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 17:40:23 +00:00
lavc: always use default slice count
Use default slice count also for JPEG with threads==1 because it is no longer broken with current FFmpeg code.
This commit is contained in:
@@ -774,8 +774,7 @@ bool set_codec_ctx_params(struct state_video_compress_libav *s, AVPixelFormat pi
|
||||
|
||||
codec_params[ug_codec].set_param(s->codec_ctx, &s->params);
|
||||
set_codec_thread_mode(s->codec_ctx, &s->params);
|
||||
// currently FFmpeg JPEG encoder produces broken JPEGs if not using encoding threads and slices > 1
|
||||
s->codec_ctx->slices = IF_NOT_UNDEF_ELSE(s->params.slices, s->codec_ctx->codec_id == AV_CODEC_ID_MJPEG && s->codec_ctx->thread_count <= 1 ? 1 : DEFAULT_SLICE_COUNT);
|
||||
s->codec_ctx->slices = IF_NOT_UNDEF_ELSE(s->params.slices, DEFAULT_SLICE_COUNT);
|
||||
|
||||
if (!s->params.have_preset) {
|
||||
string preset{};
|
||||
|
||||
Reference in New Issue
Block a user