[FFmpeg-devel] [PATCH] lavfi/overlay: show incoming frames on debug messages

Stefano Sabatini stefasab at gmail.com
Fri Jun 20 14:56:00 CEST 2014


This is especially useful to debug queue overflow issues.

Ideally we should be able to set the debug message at the
dualinput/framesync level, but they do not have the information related
to the filter context and the inlink, so cannot access much useful
information.

Signed-off-by: Stefano Sabatini <stefasab at gmail.com>
---
 libavfilter/vf_overlay.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index beb4e8f..0f7ed4d 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -34,6 +34,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/opt.h"
+#include "libavutil/timestamp.h"
 #include "internal.h"
 #include "dualinput.h"
 #include "drawutils.h"
@@ -577,6 +578,7 @@ static AVFrame *do_blend(AVFilterContext *ctx, AVFrame *mainpic,
 static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
 {
     OverlayContext *s = inlink->dst->priv;
+    av_log(inlink->dst, AV_LOG_DEBUG, "Incoming frame (time:%s) from link #%d\n", av_ts2timestr(inpicref->pts, &inlink->time_base), FF_INLINK_IDX(inlink));
     return ff_dualinput_filter_frame(&s->dinput, inlink, inpicref);
 }
 
-- 
1.8.3.2



More information about the ffmpeg-devel mailing list