[FFmpeg-cvslog] r24844 - trunk/libavfilter/avfilter.c

stefano subversion
Fri Aug 20 16:41:21 CEST 2010


Author: stefano
Date: Fri Aug 20 16:41:21 2010
New Revision: 24844

Log:
Make ff_dprintf_picref() print video properties only if available.

Modified:
   trunk/libavfilter/avfilter.c

Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c	Fri Aug 20 16:41:18 2010	(r24843)
+++ trunk/libavfilter/avfilter.c	Fri Aug 20 16:41:21 2010	(r24844)
@@ -194,13 +194,18 @@ int avfilter_config_links(AVFilterContex
 void ff_dprintf_picref(void *ctx, AVFilterBufferRef *picref, int end)
 {
     dprintf(ctx,
-            "picref[%p data:%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->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",
+                picref->video->pixel_aspect.num, picref->video->pixel_aspect.den,
+                picref->video->w, picref->video->h);
+    }
+    dprintf(ctx, "]%s", end ? "\n" : "");
 }
 
 void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)



More information about the ffmpeg-cvslog mailing list