mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
Merge remote-tracking branch 'cigaes/master'
* cigaes/master: lavfi/dualinput: fix shortest option. lavfi/vf_tile: use av_make_q. lavfi/avf_concat: use av_make_q. lavfi/af_amerge: use av_make_q. lavu/rational: add syntactic sugar. Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
0500623d58
@ -15,6 +15,9 @@ libavutil: 2012-10-22
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2014-01-19 - xxxxxxx - lavu 52.63.100 - rational.h
|
||||
Add av_make_q() function.
|
||||
|
||||
2013-12-xx - xxxxxxx - lavu 53.2.0 - frame.h
|
||||
Add AV_FRAME_DATA_MATRIXENCODING value to the AVFrameSideDataType enum, which
|
||||
identifies AVMatrixEncoding data.
|
||||
|
@ -259,7 +259,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
|
||||
outbuf->pts = inbuf[0]->pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE :
|
||||
inbuf[0]->pts +
|
||||
av_rescale_q(am->in[0].pos,
|
||||
(AVRational){ 1, ctx->inputs[0]->sample_rate },
|
||||
av_make_q(1, ctx->inputs[0]->sample_rate),
|
||||
ctx->outputs[0]->time_base);
|
||||
|
||||
outbuf->nb_samples = nb_samples;
|
||||
|
@ -174,7 +174,7 @@ static int push_frame(AVFilterContext *ctx, unsigned in_no, AVFrame *buf)
|
||||
if (inlink->sample_rate)
|
||||
/* use number of audio samples */
|
||||
in->pts += av_rescale_q(buf->nb_samples,
|
||||
(AVRational){ 1, inlink->sample_rate },
|
||||
av_make_q(1, inlink->sample_rate),
|
||||
outlink->time_base);
|
||||
else if (in->nb_frames >= 2)
|
||||
/* use mean duration */
|
||||
|
@ -57,7 +57,7 @@ int ff_dualinput_init(AVFilterContext *ctx, FFDualInputContext *s)
|
||||
in[1].after = EXT_INFINITY;
|
||||
|
||||
if (s->shortest)
|
||||
in[1].after = EXT_STOP;
|
||||
in[0].after = in[1].after = EXT_STOP;
|
||||
if (!s->repeatlast) {
|
||||
in[0].after = EXT_STOP;
|
||||
in[1].sync = 0;
|
||||
|
@ -113,7 +113,7 @@ static int config_props(AVFilterLink *outlink)
|
||||
outlink->h = tile->h * inlink->h + total_margin_h;
|
||||
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
|
||||
outlink->frame_rate = av_mul_q(inlink->frame_rate,
|
||||
(AVRational){ 1, tile->nb_frames });
|
||||
av_make_q(1, tile->nb_frames));
|
||||
ff_draw_init(&tile->draw, inlink->format, 0);
|
||||
ff_draw_color(&tile->draw, &tile->blank, tile->rgba_color);
|
||||
|
||||
|
@ -45,6 +45,17 @@ typedef struct AVRational{
|
||||
int den; ///< denominator
|
||||
} AVRational;
|
||||
|
||||
/**
|
||||
* Create a rational.
|
||||
* Useful for compilers that do not support compound literals.
|
||||
* @note The return value is not reduced.
|
||||
*/
|
||||
static inline AVRational av_make_q(int num, int den)
|
||||
{
|
||||
AVRational r = { num, den };
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare two rationals.
|
||||
* @param a first rational
|
||||
|
@ -56,7 +56,7 @@
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 52
|
||||
#define LIBAVUTIL_VERSION_MINOR 62
|
||||
#define LIBAVUTIL_VERSION_MINOR 63
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
|
Loading…
Reference in New Issue
Block a user