[FFmpeg-devel] [PATCH] Move av_parse_frame_size() and av_parse_frame_rate() from libavcodec to libavcore
Måns Rullgård
mans
Sat Jul 24 13:41:50 CEST 2010
Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> On date Saturday 2010-07-24 04:18:22 +0200, Michael Niedermayer encoded:
>> On Fri, Jul 23, 2010 at 12:57:15PM +0200, Stefano Sabatini wrote:
>> [...]
>> > +
>> > +int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg)
>> > +{
>> > + int i;
>> > + int n = FF_ARRAY_ELEMS(video_frame_rate_abbrs);
>> > + char* cp;
>> > +
>> > + /* First, we check our abbreviation table */
>> > + for (i = 0; i < n; ++i)
>> > + if (!strcmp(video_frame_rate_abbrs[i].abbr, arg)) {
>>
>> > + frame_rate->num = video_frame_rate_abbrs[i].rate_num;
>> > + frame_rate->den = video_frame_rate_abbrs[i].rate_den;
>>
>> video_frame_rate_abbrs should contain AVRationals
>> and i wonder if it would be simpler if both functions accepted AVRational
>
> A size is not a rational, also I'm not sure the following is legal:
> { "pal", (AVRational) {1, 25} },
What would be the meaning of that, and why would you need to do it?
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list