[FFmpeg-devel] [PATCH 04/17] lavfi: merge two variables after a recent commit.
Nicolas George
george at nsup.org
Thu Dec 29 16:33:50 EET 2016
Signed-off-by: Nicolas George <george at nsup.org>
---
libavfilter/avfilter.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
Unchanged.
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index ccc22a1444..2c41ea8c22 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -1098,7 +1098,6 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
int (*filter_frame)(AVFilterLink *, AVFrame *);
AVFilterContext *dstctx = link->dst;
AVFilterPad *dst = link->dstpad;
- AVFrame *out = NULL;
int ret;
AVFilterCommand *cmd= link->dst->command_queue;
int64_t pts;
@@ -1111,9 +1110,8 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
if (ret < 0)
goto fail;
}
- out = frame; /* TODO rename */
- while(cmd && cmd->time <= out->pts * av_q2d(link->time_base)){
+ while(cmd && cmd->time <= frame->pts * av_q2d(link->time_base)){
av_log(link->dst, AV_LOG_DEBUG,
"Processing command time:%f command:%s arg:%s\n",
cmd->time, cmd->command, cmd->arg);
@@ -1122,9 +1120,9 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
cmd= link->dst->command_queue;
}
- pts = out->pts;
+ pts = frame->pts;
if (dstctx->enable_str) {
- int64_t pos = av_frame_get_pkt_pos(out);
+ int64_t pos = av_frame_get_pkt_pos(frame);
dstctx->var_values[VAR_N] = link->frame_count_out;
dstctx->var_values[VAR_T] = pts == AV_NOPTS_VALUE ? NAN : pts * av_q2d(link->time_base);
dstctx->var_values[VAR_W] = link->w;
@@ -1136,13 +1134,12 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
(dstctx->filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC))
filter_frame = default_filter_frame;
}
- ret = filter_frame(link, out);
+ ret = filter_frame(link, frame);
link->frame_count_out++;
ff_update_link_current_pts(link, pts);
return ret;
fail:
- av_frame_free(&out);
av_frame_free(&frame);
return ret;
}
--
2.11.0
More information about the ffmpeg-devel
mailing list