[FFmpeg-devel] [PATCH] ffprobe: implement generic reindent logic in the JSON writer

Stefano Sabatini stefasab at gmail.com
Sun Jan 8 11:26:03 CET 2012


On date Sunday 2012-01-08 02:35:00 +0100, Clément Bœsch encoded:
> On Sun, Jan 08, 2012 at 02:27:20AM +0100, Stefano Sabatini wrote:
> > Clarify/generalize indent logic, possibly slower.
> > ---
> >  ffprobe.c |   54 ++++++++++++++++++++++++++++++++++++++----------------
> >  1 files changed, 38 insertions(+), 16 deletions(-)
[...]
> > +#define INDENT "    "
> > +
> > +#define JSON_INDENT() { int i; for (i = 0; i < json->indent_level; i++) printf(INDENT); }
> > +
> 
> I think I already suggested in a "very" old patch that this could be done
> with "%*c", json->indent_level * 4, ' '. It might be faster (and cleaner).
> 
> Are you against this?

No, I was not aware of the syntax and failed to find reference to it
the first time. Updated.
-- 
FFmpeg = Foolish & Fabulous Magic Powered Epic Glue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffprobe-implement-generic-reindent-logic-in-the-JSON.patch
Type: text/x-diff
Size: 5182 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120108/a2a867f3/attachment.bin>


More information about the ffmpeg-devel mailing list