[FFmpeg-cvslog] lavfi/ashowinfo: only print checksum for the existing planes

Stefano Sabatini git at videolan.org
Tue Feb 14 18:04:05 CET 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Thu Feb  9 23:59:16 2012 +0100| [f89f9bdadd202f411f14b3f681eb5eac33be66fa] | committer: Stefano Sabatini

lavfi/ashowinfo: only print checksum for the existing planes

Make the output a bit nicer.

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

 libavfilter/af_ashowinfo.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
index e4dc6b3..12d0315 100644
--- a/libavfilter/af_ashowinfo.c
+++ b/libavfilter/af_ashowinfo.c
@@ -66,7 +66,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
     av_log(ctx, AV_LOG_INFO,
            "n:%d pts:%s pts_time:%s pos:%"PRId64" "
            "fmt:%s chlayout:%s nb_samples:%d rate:%d planar:%d "
-           "checksum:%08X plane_checksum[%08X %08X %08X %08X %08X %08X %08X %08X]\n",
+           "checksum:%08X plane_checksum[%08X",
            showinfo->frame,
            av_ts2str(samplesref->pts), av_ts2timestr(samplesref->pts, &inlink->time_base),
            samplesref->pos,
@@ -76,11 +76,13 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
            samplesref->audio->sample_rate,
            samplesref->audio->planar,
            checksum,
-           plane_checksum[0], plane_checksum[1], plane_checksum[2], plane_checksum[3],
-           plane_checksum[4], plane_checksum[5], plane_checksum[6], plane_checksum[7]);
+           plane_checksum[0]);
 
-    showinfo->frame++;
+    for (plane = 1; samplesref->data[plane] && plane < 8; plane++)
+        av_log(ctx, AV_LOG_INFO, " %08X", plane_checksum[plane]);
+    av_log(ctx, AV_LOG_INFO, "]\n");
 
+    showinfo->frame++;
     avfilter_filter_samples(inlink->dst->outputs[0], samplesref);
 }
 



More information about the ffmpeg-cvslog mailing list