You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/graphparser: fix filter instance name when an id is provided
Restores the behavior of naming the instance filter@id, which was accidentally changed
to simpy id in commit f17051eaae
.
Fixes ticket #10226.
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -532,8 +532,7 @@ int avfilter_graph_segment_create_filters(AVFilterGraphSegment *seg, int flags)
|
|||||||
for (size_t j = 0; j < ch->nb_filters; j++) {
|
for (size_t j = 0; j < ch->nb_filters; j++) {
|
||||||
AVFilterParams *p = ch->filters[j];
|
AVFilterParams *p = ch->filters[j];
|
||||||
const AVFilter *f = avfilter_get_by_name(p->filter_name);
|
const AVFilter *f = avfilter_get_by_name(p->filter_name);
|
||||||
char inst_name[30], *name = p->instance_name ? p->instance_name :
|
char name[64];
|
||||||
inst_name;
|
|
||||||
|
|
||||||
// skip already processed filters
|
// skip already processed filters
|
||||||
if (p->filter || !p->filter_name)
|
if (p->filter || !p->filter_name)
|
||||||
@@ -546,7 +545,9 @@ int avfilter_graph_segment_create_filters(AVFilterGraphSegment *seg, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!p->instance_name)
|
if (!p->instance_name)
|
||||||
snprintf(inst_name, sizeof(inst_name), "Parsed_%s_%zu", f->name, idx);
|
snprintf(name, sizeof(name), "Parsed_%s_%zu", f->name, idx);
|
||||||
|
else
|
||||||
|
snprintf(name, sizeof(name), "%s@%s", f->name, p->instance_name);
|
||||||
|
|
||||||
p->filter = avfilter_graph_alloc_filter(seg->graph, f, name);
|
p->filter = avfilter_graph_alloc_filter(seg->graph, f, name);
|
||||||
if (!p->filter)
|
if (!p->filter)
|
||||||
|
Reference in New Issue
Block a user