[FFmpeg-devel] [PATCH] avutil: expand the size of LINE_SZ to 2048.
qyot27 at gmail.com
Sat Aug 10 09:54:39 CEST 2013
On Wed, Aug 7, 2013 at 8:02 PM, Alexander Strasser <eclipse7 at gmx.net> wrote:
> It might be rather unfortunate to remove the configure line from
> normal invocation. It speeds up trouble shooting and can be helpful
> when working on bug reports.
> Printing it in a nicer way and splitting over multiple lines sounds
> like a good idea though. But try to do it in the simplest and robust
> way you can think of. Over-engineering won't add much value here and
> some trouble in the worst case.
As a compromise, the solution I came up with will only disable the
configuration line from normal invocation if it's in danger of hitting the
character limit, since if it did that there's no telling what kind of
information would get truncated. It'll notify the user to use the new
-buildconf option to see that information instead. If the size of
FFMPEG_CONFIGURATION is smaller than the limit (currently set at 1000
characters so that there's no danger of it actually hitting 1024), then it
still displays like normal.
Unfortunately, my ideas about how to get it to print one option per line
didn't really pan out since I was just messing around with sed*, and
there's no way of predicting that sed's behavior will remain the same
across the different versions of it used on various platforms (and I even
encountered this; with one method, it'd screw up on Linux but work
reasonably okay on OSX, and with a different method, exactly the reverse).
So for right now it just looks near-exactly the same as the current
'configuration:' line, just printed after the basic report where it's not
in danger of colliding with any other text. It's set up to where a better
idea on formatting the output of -buildconf can probably be dropped into
the print_buildconf function and just work.
*the way that one-per-line can work this way is creating a secondary
variable, I went with FFMPEG_CONFIGURATION_FORMATTED, that forces a literal
'///n ' into the define between each parameter. av_log/printf can deal
with it correctly if the string is reproduced exactly like that. But
there's too much wiggle-room that can cause it to insert real newlines into
the define, and that doesn't work (everything still shows up, but the
newlines are erased and the parameters are all spaced apart too much as a
I'll send the patches momentarily.
More information about the ffmpeg-devel