mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
Merge commit '7d12cba95ca15198a930c05458dc414ac00c578b'
* commit '7d12cba95ca15198a930c05458dc414ac00c578b': vf_framepack: Check and update frame_rate Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
commit
1cb78a0dcf
@ -78,12 +78,12 @@ static av_cold void framepack_uninit(AVFilterContext *ctx)
|
|||||||
|
|
||||||
static int config_output(AVFilterLink *outlink)
|
static int config_output(AVFilterLink *outlink)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = outlink->src;
|
AVFilterContext *ctx = outlink->src;
|
||||||
FramepackContext *s = outlink->src->priv;
|
FramepackContext *s = outlink->src->priv;
|
||||||
|
|
||||||
int width = ctx->inputs[LEFT]->w;
|
int width = ctx->inputs[LEFT]->w;
|
||||||
int height = ctx->inputs[LEFT]->h;
|
int height = ctx->inputs[LEFT]->h;
|
||||||
AVRational time_base = ctx->inputs[LEFT]->time_base;
|
AVRational time_base = ctx->inputs[LEFT]->time_base;
|
||||||
AVRational frame_rate = ctx->inputs[LEFT]->frame_rate;
|
AVRational frame_rate = ctx->inputs[LEFT]->frame_rate;
|
||||||
|
|
||||||
// check size and fps match on the other input
|
// check size and fps match on the other input
|
||||||
@ -117,7 +117,7 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
// modify output properties as needed
|
// modify output properties as needed
|
||||||
switch (s->format) {
|
switch (s->format) {
|
||||||
case AV_STEREO3D_FRAMESEQUENCE:
|
case AV_STEREO3D_FRAMESEQUENCE:
|
||||||
time_base.den *= 2;
|
time_base.den *= 2;
|
||||||
frame_rate.num *= 2;
|
frame_rate.num *= 2;
|
||||||
|
|
||||||
s->double_pts = AV_NOPTS_VALUE;
|
s->double_pts = AV_NOPTS_VALUE;
|
||||||
@ -135,10 +135,10 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
outlink->w = width;
|
outlink->w = width;
|
||||||
outlink->h = height;
|
outlink->h = height;
|
||||||
outlink->time_base = time_base;
|
outlink->time_base = time_base;
|
||||||
outlink->frame_rate= frame_rate;
|
outlink->frame_rate = frame_rate;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user