aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_mux_init.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2025-02-14 13:17:43 -0300
committerJames Almer <jamrial@gmail.com>2025-02-17 09:40:13 -0300
commit0e7c2a6287f977c30e08e2a211385c6a80614fe8 (patch)
tree23d928f3467e3a25676fb3805726ce51a7f7ea66 /fftools/ffmpeg_mux_init.c
parentb92577405b40b6eb5ecf0036060e34e0219da1e3 (diff)
downloadffmpeg-0e7c2a6287f977c30e08e2a211385c6a80614fe8.tar.gz
fftools/ffmpeg: use an int for nb_threads
Removes unnecessary allocations. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'fftools/ffmpeg_mux_init.c')
-rw-r--r--fftools/ffmpeg_mux_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 944176ca5d..4a973e5286 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -930,6 +930,7 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter,
.ts_offset = mux->of.start_time == AV_NOPTS_VALUE ?
0 : mux->of.start_time,
.vs = vs,
+ .nb_threads = -1,
.flags = OFILTER_FLAG_DISABLE_CONVERT * !!keep_pix_fmt |
OFILTER_FLAG_AUTOSCALE * !!autoscale |
@@ -982,7 +983,7 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter,
}
if (threads_manual) {
- ret = av_opt_get(enc_ctx, "threads", 0, (uint8_t**)&opts.nb_threads);
+ ret = av_opt_get_int(enc_ctx, "threads", 0, &opts.nb_threads);
if (ret < 0)
return ret;
}
@@ -1002,7 +1003,6 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter,
ost->filter = ost->fg_simple->outputs[0];
}
- av_freep(&opts.nb_threads);
if (ret < 0)
return ret;