Opened 4 months ago

Last modified 4 months ago

#11099 reopened enhancement

"streamselect" filter, "map" parsing

Reported by: ManDay Owned by:
Priority: normal Component: documentation
Version: unspecified Keywords: streamselect astreamselect
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by ManDay)

It seems the streamselect filter (which is important, because it is the only method to consistently define substitution macros!) does not parse the map beyond the first argument:

const int n = strtol(map, &p, 0);  

if (map == p)
    break;
map = p;

will at most read up to the first (unspecified) seperator, whence it stops. Instead, I think, should read

if (map == p)
    break;

map = p + (*p != '\0');

https://ffmpeg.org/doxygen/trunk/f__streamselect_8c_source.html#l00205

Change History (6)

comment:1 by ManDay, 4 months ago

Description: modified (diff)

comment:2 by ManDay, 4 months ago

Resolution: invalid
Status: newclosed

The problem disappears when whitespace is used as the seperator (which is undocumented), because strotol will skip past it.

comment:3 by MasterQuestionable, 4 months ago

Cc: MasterQuestionable added
Component: avfilterdocumentation
Keywords: astreamselect added
Resolution: invalid
Status: closedreopened
Summary: streamselect filter, map parsing"streamselect" filter, "map" parsing
Type: defectenhancement

͏    https://ffmpeg.org/ffmpeg-filters.html#streamselect_002c-astreamselect
͏    Semantic-wise poor design, seemingly.

͏    Probably related:
͏    https://ffmpeg.org/ffmpeg-filters.html#sendcmd_002c-asendcmd

Last edited 4 months ago by MasterQuestionable (previous) (diff)

comment:4 by ManDay, 4 months ago

Why is this reopened?

comment:5 by MasterQuestionable, 4 months ago

͏    Potential documentation issue.
͏    (probably also else)

͏    Related:
͏    https://trac.ffmpeg.org/ticket/11100
͏    https://trac.ffmpeg.org/ticket/11104

Last edited 4 months ago by MasterQuestionable (previous) (diff)

comment:6 by MasterQuestionable, 4 months ago

͏    Would you explain somewhat, what sort of application do you have with alike filters?
͏    The feedback may help analyzing the relevant filters' design.

Note: See TracTickets for help on using tickets.