[FFmpeg-trac] #10448(avfilter:new): filter instance name (AVFilterContext->name) isn't unique (no longer has filter_name@ prepended)

FFmpeg trac at avcodec.org
Wed Jul 5 23:49:10 EEST 2023


#10448: filter instance name (AVFilterContext->name) isn't unique (no longer has
filter_name@ prepended)
-------------------------------------+-------------------------------------
             Reporter:  Alan Amaral  |                     Type:  defect
               Status:  new          |                 Priority:  critical
            Component:  avfilter     |                  Version:  git-
                                     |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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 at v0_input] [overlay] [overlay at v0_input]
 for these 3 values, but 6.0 prints [v0_input] [overlay] [overlay at 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 at reticle" and "movie at 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 at instance_name") and then try to use zmqsend to change the
 filter using the filter_name at instance name.  Zmqsend will always return 38
 Function not implemented.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10448>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list