[FFmpeg-devel] [PATCH 4/6] lavfi/life: make use of AV_OPT_TYPE_VIDEO_RATE
Paul B Mahol
onemda at gmail.com
Tue Mar 26 13:44:55 CET 2013
On 3/26/13, Clement Boesch <ubitux at gmail.com> wrote:
> On Tue, Mar 26, 2013 at 12:26:33PM +0000, Paul B Mahol wrote:
> [...]
>> - life->time_base.num = frame_rate.den;
>> - life->time_base.den = frame_rate.num;
>> -
>> if (!life->filename) {
>> /* fill the grid randomly */
>> int i;
>> @@ -293,7 +282,7 @@ static int init(AVFilterContext *ctx, const char
>> *args)
>>
>> av_log(ctx, AV_LOG_VERBOSE,
>> "s:%dx%d r:%d/%d rule:%s stay_rule:%d born_rule:%d stitch:%d
>> seed:%u\n",
>> - life->w, life->h, frame_rate.num, frame_rate.den,
>> + life->w, life->h, life->frame_rate.num, life->frame_rate.den,
>> life->rule_str, life->stay_rule, life->born_rule,
>> life->stitch,
>> life->random_seed);
>> return 0;
>> @@ -315,7 +304,7 @@ static int config_props(AVFilterLink *outlink)
>>
>> outlink->w = life->w;
>> outlink->h = life->h;
>> - outlink->time_base = life->time_base;
>> + outlink->time_base = life->frame_rate;
>
> Isn't this supposed to be swapped?
Dunno, this is what original code did, I just made code less convoluted.
It parsed video_rate from string into frame_rate AVRational and than
copied it (another level of indirection, copies num/den separately for
some reason)
to internal time_base stored in filter private data, this one is then "directly"
copied to outllink time base.
It is just cargo cult.
>
> --
> Clement B.
>
More information about the ffmpeg-devel
mailing list