[FFmpeg-devel] [PATCH 1/5] lavfi: add internal functions for parsing format arguments
Mina Nagy Zaki
mnzaki at gmail.com
Fri Aug 12 11:38:00 CEST 2011
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-add-internal-functions-for-parsing-format-argu.patch
Type: text/x-diff
Size: 4438 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110812/1d863a9d/attachment.bin>
More information about the ffmpeg-devel
mailing list