]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avfilter.c
Extend ff_dprintf_picref() to make it print video interlaced and
[ffmpeg] / libavfilter / avfilter.c
index a9a361cd25edf4b26098d6b4d1d5279504eac165..99ed8fab3b818e64b3dabef8b9e11fe9e352270f 100644 (file)
@@ -194,13 +194,20 @@ int avfilter_config_links(AVFilterContext *filter)
 void ff_dprintf_picref(void *ctx, AVFilterBufferRef *picref, int end)
 {
     dprintf(ctx,
-            "picref[%p data[%p, %p, %p, %p] linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64" a:%d/%d s:%dx%d]%s",
+            "picref[%p data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64,
             picref,
-            picref->data    [0], picref->data    [1], picref->data    [2], picref->data    [3],
+            picref->data[0],
             picref->linesize[0], picref->linesize[1], picref->linesize[2], picref->linesize[3],
-            picref->pts, picref->pos,
-            picref->video->pixel_aspect.num, picref->video->pixel_aspect.den, picref->video->w, picref->video->h,
-            end ? "\n" : "");
+            picref->pts, picref->pos);
+
+    if (picref->video) {
+        dprintf(ctx, " a:%d/%d s:%dx%d i:%c",
+                picref->video->pixel_aspect.num, picref->video->pixel_aspect.den,
+                picref->video->w, picref->video->h,
+                !picref->video->interlaced     ? 'P' :         /* Progressive  */
+                picref->video->top_field_first ? 'T' : 'B');   /* Top / Bottom */
+    }
+    dprintf(ctx, "]%s", end ? "\n" : "");
 }
 
 void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)