[FFmpeg-cvslog] commit: Make ff_dprintf_link() print meaningful information for audio links . (Stefano Sabatini )

git at videolan.org git
Sun Jan 16 15:03:15 CET 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Jan 15 19:58:29 2011 +0000| [7986e34db075df9b02d277d15b596e0341cbf19a] | committer: Stefano Sabatini 

Make ff_dprintf_link() print meaningful information for audio links.

Originally committed as revision 26378 to svn://svn.ffmpeg.org/ffmpeg/trunk

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7986e34db075df9b02d277d15b596e0341cbf19a
---

 libavfilter/avfilter.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 5a0ab8e..b99bcbb 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -246,6 +246,7 @@ void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end)
 
 void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)
 {
+    if (link->type == AVMEDIA_TYPE_VIDEO) {
     dprintf(ctx,
             "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
             link, link->w, link->h,
@@ -253,6 +254,18 @@ void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)
             link->src ? link->src->filter->name : "",
             link->dst ? link->dst->filter->name : "",
             end ? "\n" : "");
+    } else {
+        char buf[128];
+        av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
+
+        dprintf(ctx,
+                "link[%p r:%"PRId64" cl:%s fmt:%-16s %-16s->%-16s]%s",
+                link, link->sample_rate, buf,
+                av_get_sample_fmt_name(link->format),
+                link->src ? link->src->filter->name : "",
+                link->dst ? link->dst->filter->name : "",
+                end ? "\n" : "");
+    }
 }
 
 AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)




More information about the ffmpeg-cvslog mailing list