[FFmpeg-devel] [PATCH] Move the video size and rate abbreviations system from libavformat to libavcodec

Stefano Sabatini stefano.sabatini-lala
Mon Jun 11 14:35:47 CEST 2007

On date Monday 2007-06-11 14:11:36 +0200, Benoit Fouet encoded:
> Hi,
> Stefano Sabatini wrote:
> > Index: libavformat/utils.c
> > ===================================================================
> > --- libavformat/utils.c	(revision 9235)
> > +++ libavformat/utils.c	(working copy)
> > -int parse_frame_rate(int *frame_rate, int *frame_rate_base, const char *arg)
> > +int parse_frame_rate(int *frame_rate_num, int *frame_rate_den, const char *arg)
> >   
> why do you rename those parameters ?

First solution:
int parse_frame_rate(int *frame_rate, int *frame_rate_base, const char *arg)
    AVRational frame_rate_q;
    int ret = av_parse_video_frame_rate(&frame_rate_q, arg);
    *frame_rate= frame_rate_q.num;
    *frame_rate_base= frame_rate_q.den;
    return ret;

Second one:
int parse_frame_rate(int *frame_rate_num, int *frame_rate_den, const char *arg)
    AVRational frame_rate;
    int ret = av_parse_video_frame_rate(&frame_rate, arg);
    *frame_rate_num= frame_rate.num;
    *frame_rate_den= frame_rate.den;
    return ret;

The second one looks better to me, but that doesn't really matter, and
yep, it's a cosmetic change, it seems I can't resist without making them ;-),
so please choose which you prefer (first one attached).

Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move-video-abbrs-support-to-libavcodec-06.patch
Type: text/x-diff
Size: 10639 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070611/3ad2dccc/attachment.patch>

More information about the ffmpeg-devel mailing list