You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avfilter/vf_libplacebo: allow differing formats per input
Each input is entirely independent and can have varying pixel formats, color spaces, etc. To accomplish this, we need to make a full copy of the format list for each subsequent input, rather than sharing the same ref. Signed-off-by: Niklas Haas <git@haasn.dev> Sponsored-by: nxtedition
This commit is contained in:
@ -1159,8 +1159,16 @@ static int libplacebo_query_format(const AVFilterContext *ctx,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for (int i = 0; i < s->nb_inputs; i++)
|
||||
for (int i = 0; i < s->nb_inputs; i++) {
|
||||
if (i > 0) {
|
||||
/* Duplicate the format list for each subsequent input */
|
||||
infmts = NULL;
|
||||
for (int n = 0; n < cfg_in[0]->formats->nb_formats; n++)
|
||||
RET(ff_add_format(&infmts, cfg_in[0]->formats->formats[n]));
|
||||
}
|
||||
RET(ff_formats_ref(infmts, &cfg_in[i]->formats));
|
||||
}
|
||||
|
||||
RET(ff_formats_ref(outfmts, &cfg_out[0]->formats));
|
||||
|
||||
/* Set colorspace properties */
|
||||
|
Reference in New Issue
Block a user