[FFmpeg-devel] [PATCH] ffprobe: do not print section_sep if it is not defined in the writer

Clément Bœsch ubitux at gmail.com
Sun Sep 25 02:35:53 CEST 2011


On Sun, Sep 25, 2011 at 02:16:58AM +0200, Clément Bœsch wrote:
> On Sun, Sep 25, 2011 at 02:09:11AM +0200, Stefano Sabatini wrote:
> > Avoid the need of having to specify it in the writer definitions.
> > ---
> >  ffprobe.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/ffprobe.c b/ffprobe.c
> > index cabc8c8..d12c98c 100644
> > --- a/ffprobe.c
> > +++ b/ffprobe.c
> > @@ -560,7 +560,7 @@ static int get_writer(const char *name)
> >          show_ ## name (w, fmt_ctx);                           \
> >          if (w->print_section_end)                             \
> >              w->print_section_end(#name, multiple_entries);    \
> > -        if (left)                                             \
> > +        if (left && w->section_sep)                           \
> >              printf("%s", w->section_sep);                     \
> >      }                                                         \
> >  } while (0)
> 
> OK
> 
> Note: maybe we should doxycomment which field are mandatory, and which
> aren't.
> 

Mmmh actually, I think it lacks parenthesis around the left. It doesn't
work for the show_packets case for instance.

-- 
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/20110925/2af8d410/attachment.asc>


More information about the ffmpeg-devel mailing list