[FFmpeg-cvslog] af_pan: fix parsing arguments from the example in the documentation

Clément Bœsch ubitux at gmail.com
Fri Apr 12 10:37:51 CEST 2013


On Fri, Apr 12, 2013 at 10:20:50AM +0200, Серж Нискородов wrote:
> ffmpeg | branch: master | Серж Нискородов <sghpunk at gmail.com> | Fri Apr 12 10:02:01 2013 +0200| [9470b541e5c4c4131723df09b0f7fb248b7ee1b9] | committer: Michael Niedermayer
> 
> af_pan: fix parsing arguments from the example in the documentation
> 
> pan=stereo: FL < FL + 0.5*FC + 0.6*BL + 0.6*SL : FR < FR + 0.5*FC +
> 0.6*BR + 0.6*SR
> 
> didn't actually work ('Expected out channel name, got " FL < FL"')
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9470b541e5c4c4131723df09b0f7fb248b7ee1b9
> ---
> 
>  libavfilter/af_pan.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
> index 038a8a1..4fa81ab 100644
> --- a/libavfilter/af_pan.c
> +++ b/libavfilter/af_pan.c
> @@ -60,7 +60,7 @@ static int parse_channel_name(char **arg, int *rchannel, int *rnamed)
>      int64_t layout, layout0;
>  
>      /* try to parse a channel name, e.g. "FL" */
> -    if (sscanf(*arg, "%7[A-Z]%n", buf, &len)) {
> +    if (sscanf(*arg, " %7[A-Z] %n", buf, &len)) {

If you look at e3a1eb9e, "Some implementations of sscanf do not handle a
space before a trailing %n properly."

Are you sure this is going to work with MSVC?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20130412/52236d9e/attachment.asc>


More information about the ffmpeg-cvslog mailing list