[FFmpeg-devel] [PATCH 1/5] lavfi: add internal functions for parsing format arguments

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri Aug 12 14:34:07 CEST 2011


On date Friday 2011-08-12 12:38:00 +0300, Mina Nagy Zaki encoded:
> On Tue, Aug 09, 2011 at 12:15:03AM +0200, Stefano Sabatini wrote:
> > On date Monday 2011-08-08 14:04:29 -0400, Justin Ruggles encoded:
> > > On 08/08/2011 11:36 AM, Mina Nagy Zaki wrote:
> > > 
> > > > +int64_t ff_parse_channel_layout(char *arg, void *log_ctx)
> > > > +{
> > > > +    char *tail;
> > > > +    int64_t chlayout = av_get_channel_layout(arg);
> > > > +    if (chlayout <= 0) {
> > > > +        chlayout = strtol(arg, &tail, 0);
> > > > +        if (*tail || chlayout <= 0) {
> > > 
> > > 
> > > This would preclude using the high bit for a channel mask value should
> > > it be needed someday. There is nowhere else I can find where
> > > channel_mask < 0 is not allowed.
> > 
> > So I suggest:
> > int ff_parse_channel_layout(int64_t *chlayout, const char *arg, void *log_ctx)
> > 
> > and follow the same pattern for the other ff_parse_*, more generic and
> > more consistent with the API.
> 
> Changed as suggested.

> From f8121aef8517dc15cb1256854ecf30c0cba68e61 Mon Sep 17 00:00:00 2001
> From: Mina Nagy Zaki <mnzaki at gmail.com>
> Date: Thu, 4 Aug 2011 12:28:14 +0300
> Subject: [PATCH 01/16] lavfi: add internal functions for parsing format
>  arguments
> 
> ---
>  libavfilter/formats.c  |   59 ++++++++++++++++++++++++++++++++++++++++++++++++
>  libavfilter/internal.h |   42 ++++++++++++++++++++++++++++++++++
>  2 files changed, 101 insertions(+), 0 deletions(-)

Looks fine, I'll apply soon if no comments.
-- 
FFmpeg = Fostering Frenzy Martial Purposeless Emblematic Genius


More information about the ffmpeg-devel mailing list