cosmetics: fix some typos
[ffmpeg.git] / libavfilter / af_ashowinfo.c
index 7c6af8b..12d0315 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "libavutil/adler32.h"
 #include "libavutil/audioconvert.h"
 
 #include "libavutil/adler32.h"
 #include "libavutil/audioconvert.h"
+#include "libavutil/timestamp.h"
 #include "avfilter.h"
 
 typedef struct {
 #include "avfilter.h"
 
 typedef struct {
@@ -63,11 +64,11 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
                                  samplesref->audio->channel_layout);
 
     av_log(ctx, AV_LOG_INFO,
                                  samplesref->audio->channel_layout);
 
     av_log(ctx, AV_LOG_INFO,
-           "n:%d pts:%"PRId64" pts_time:%f pos:%"PRId64" "
+           "n:%d pts:%s pts_time:%s pos:%"PRId64" "
            "fmt:%s chlayout:%s nb_samples:%d rate:%d planar:%d "
            "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,
            showinfo->frame,
-           samplesref->pts, samplesref->pts * av_q2d(inlink->time_base),
+           av_ts2str(samplesref->pts), av_ts2timestr(samplesref->pts, &inlink->time_base),
            samplesref->pos,
            av_get_sample_fmt_name(samplesref->format),
            chlayout_str,
            samplesref->pos,
            av_get_sample_fmt_name(samplesref->format),
            chlayout_str,
@@ -75,11 +76,13 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
            samplesref->audio->sample_rate,
            samplesref->audio->planar,
            checksum,
            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);
 }
 
     avfilter_filter_samples(inlink->dst->outputs[0], samplesref);
 }
 
@@ -90,14 +93,14 @@ AVFilter avfilter_af_ashowinfo = {
     .priv_size = sizeof(ShowInfoContext),
     .init      = init,
 
     .priv_size = sizeof(ShowInfoContext),
     .init      = init,
 
-    .inputs    = (AVFilterPad[]) {{ .name = "default",
+    .inputs    = (const AVFilterPad[]) {{ .name       = "default",
                                     .type             = AVMEDIA_TYPE_AUDIO,
                                     .get_audio_buffer = avfilter_null_get_audio_buffer,
                                     .filter_samples   = filter_samples,
                                     .min_perms        = AV_PERM_READ, },
                                   { .name = NULL}},
 
                                     .type             = AVMEDIA_TYPE_AUDIO,
                                     .get_audio_buffer = avfilter_null_get_audio_buffer,
                                     .filter_samples   = filter_samples,
                                     .min_perms        = AV_PERM_READ, },
                                   { .name = NULL}},
 
-    .outputs   = (AVFilterPad[]) {{ .name             = "default",
+    .outputs   = (const AVFilterPad[]) {{ .name       = "default",
                                     .type             = AVMEDIA_TYPE_AUDIO },
                                   { .name = NULL}},
 };
                                     .type             = AVMEDIA_TYPE_AUDIO },
                                   { .name = NULL}},
 };