mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-24 07:50:11 +01:00
fftools/ffmpeg_filter: accept a caller-provided output name
Do not construct it from OutputStream manually. Will allow decoupling filtering from encoding in future commits.
This commit is contained in:
@@ -1381,8 +1381,10 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type,
|
||||
|
||||
if (ost->enc &&
|
||||
(type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO)) {
|
||||
char name[16];
|
||||
OutputFilterOptions opts = {
|
||||
.enc = enc,
|
||||
.name = name,
|
||||
.format = (type == AVMEDIA_TYPE_VIDEO) ?
|
||||
ost->enc_ctx->pix_fmt : ost->enc_ctx->sample_fmt,
|
||||
.width = ost->enc_ctx->width,
|
||||
@@ -1396,6 +1398,8 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type,
|
||||
.flags = OFILTER_FLAG_DISABLE_CONVERT * !!keep_pix_fmt,
|
||||
};
|
||||
|
||||
snprintf(name, sizeof(name), "#%d:%d", mux->of.index, ost->index);
|
||||
|
||||
// MJPEG encoder exports a full list of supported pixel formats,
|
||||
// but the full-range ones are experimental-only.
|
||||
// Restrict the auto-conversion list unless -strict experimental
|
||||
|
||||
Reference in New Issue
Block a user