#10448 closed defect (fixed)

filter instance name (AVFilterContext->name) isn't unique (no longer has filter_name@ prepended)

Reported by: Alan Amaral Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I recently upgraded from 4.1 to 6.0 and built it with zmq support. I had been using zmq to send commands to filters as follows:

<filter_name>@<instance_name> <options>

but this no longer works. I added an av_log into avfilter_graph_send_command() that prints out:
filter->name, filter->filter->name and target and the
filter->name no longer has the <filter_name>@ prepended.
The 4.1 code printed [overlay@v0_input] [overlay] [overlay@v0_input]
for these 3 values, but 6.0 prints [v0_input] [overlay] [overlay@v0_input] instead. This effectively breaks zmq support.
Note also that filter->name, when printed out, is NOT unique anymore. I have multiple different types of filters, that use the same name, i.e. "scale@reticle" and "movie@reticle" and these now both show up as "reticle" when filter->name is printed.

The code that processes the commands through the filter graph (where I added the av_log call) has this test:

if (!strcmp(target, "all")
(filter->name && !strcmp(target, filter->name))

!strcmp(target, filter->filter->name)) {

and that code hasn't changed from 4.1 to 6.0. Either this test should have changed, or the code that sets filter->name should not be removing the <filter_name>@ from the given filter name. Also, the structure definition states that filter->name should be unique, and it's not. Create 2 different filters named <filter_1>@foo and <filter_2>@foo and you'll see that both have the filter->name "foo".

How to reproduce:

Create a simple filter graph with an instance name (i.e. "filter_name@instance_name") and then try to use zmqsend to change the filter using the filter_name@instance name. Zmqsend will always return 38 Function not implemented.

Change History (3)

comment:1 by Elon Musk, 16 months ago

Check if same bug exist in latest master git version.

comment:2 by Alan Amaral, 16 months ago

It looks like it's fixed in the latest master. Thanks for replying.

comment:3 by Leo Izen, 15 months ago

Priority: criticalnormal
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.