[FFmpeg-devel] [PATCH] af_pan: Fix sscanf formats to work with buggy sscanf implementations

Clément Bœsch ubitux at gmail.com
Fri Sep 14 20:00:57 CEST 2012

On Fri, Sep 14, 2012 at 07:55:47PM +0200, Michael Niedermayer wrote:
> On Fri, Sep 14, 2012 at 12:45:34PM -0400, Derek Buitenhuis wrote:
> > From: Hendrik Leppkes <h.leppkes at gmail.com>
> > 
> > Some implementations of sscanf do not handle a space before a trailing %n
> > properly.
> unrelated to this patch but grep says:
> libavformat/jacosubdec.c:    if (sscanf(buf, "%u:%u:%u.%u %u:%u:%u.%u %n",
> libavformat/jacosubdec.c:    if (sscanf(buf, "@%u @%u %n", &ts_start, &ts_end, &len) == 2)

If there are problems here, it should be triggered by FATE; the sample has
both timing formats.

Also, I'm checking the sscanf return value (IIRC that's not the case in
af_pan), so it might behave in a better way.


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-devel/attachments/20120914/7c159beb/attachment.asc>

More information about the ffmpeg-devel mailing list