aboutsummaryrefslogtreecommitdiffstats
path: root/doc/ffplay.texi
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-08-27 03:14:02 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-09 13:46:51 +0200
commit71daaafa3a7f0e3494b73055bdbb3fd8aa114173 (patch)
treedba822a4032dd881f315f331b402b9f6dbd622cb /doc/ffplay.texi
parentbc533ba2ae46978a826c0ace242b3e2e4cabd9fb (diff)
downloadffmpeg-71daaafa3a7f0e3494b73055bdbb3fd8aa114173.tar.gz
avfilter/af_headphone: Simplify parsing channel mapping string
When parsing the channel mapping string (a string containing '|' delimited tokens each of which is supposed to contain a channel name like "FR"), the old code would at each step read up to seven uppercase characters from the input string and give this to av_get_channel_layout() to parse. The returned layout is then checked for being a layout with a single channel set by computing its logarithm. Besides being overtly complicated this also has the drawback of relying on the assumption that every channel name consists of at most seven uppercase letters only; but said assumption is wrong: The abbreviation of the second low frequency channel is LFE2. Furthermore it treats garbage like "FRfoo" as valid channel. This commit changes this by using av_get_channel_layout() directly; furthermore, av_get_channel_layout_nb_channels() (which uses popcount) is used to find out the number of channels instead of the custom code to calculate the logarithm. (As a consequence, certain other formats to specify the channel layouts are now accepted (like the hex versions of av_get_channel_layout()); but this is actually not bad at all.) Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'doc/ffplay.texi')
0 files changed, 0 insertions, 0 deletions