mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
lavfi: move AVFilterLink.{frame,sample}_count_{in,out} to FilterLink
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
49989556f1
commit
87b0b94bde
@ -238,6 +238,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
{
|
||||
AVFilterContext *ctx = inlink->dst;
|
||||
AVFilterLink *outlink = ctx->outputs[0];
|
||||
FilterLink *outl = ff_filter_link(outlink);
|
||||
AudioDRCContext *s = ctx->priv;
|
||||
AVFrame *out;
|
||||
int ret;
|
||||
@ -248,7 +249,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
s->var_values[VAR_SN] = outlink->sample_count_in;
|
||||
s->var_values[VAR_SN] = outl->sample_count_in;
|
||||
s->var_values[VAR_T] = s->var_values[VAR_SN] / outlink->sample_rate;
|
||||
|
||||
s->in = in;
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavutil/parseutils.h"
|
||||
#include "avfilter.h"
|
||||
#include "filters.h"
|
||||
#include "internal.h"
|
||||
#include "audio.h"
|
||||
#include "video.h"
|
||||
@ -196,6 +197,7 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||
|
||||
static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
|
||||
{
|
||||
FilterLink *inl = ff_filter_link(inlink);
|
||||
AVFilterContext *ctx = inlink->dst;
|
||||
SendCmdContext *s = ctx->priv;
|
||||
int64_t ts, duration;
|
||||
@ -239,7 +241,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
|
||||
double end = TS2T(interval->end_ts, AV_TIME_BASE_Q);
|
||||
double current = TS2T(ref->pts, inlink->time_base);
|
||||
|
||||
var_values[VAR_N] = inlink->frame_count_in;
|
||||
var_values[VAR_N] = inl->frame_count_in;
|
||||
#if FF_API_FRAME_PKT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
var_values[VAR_POS] = ref->pkt_pos == -1 ? NAN : ref->pkt_pos;
|
||||
|
Loading…
Reference in New Issue
Block a user