summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-08-20 14:41:21 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-08-20 14:41:21 +0000
commit382ecd353768437d0e3f1e9e52eabcfe48b2c08b (patch)
tree4b1a10f3105561c8c8aab5f575843409550e9eb7
parent28c52b1ed9cf0fdcf214db9450e652c977853cfb (diff)
Make ff_dprintf_picref() print video properties only if available.
Originally committed as revision 24844 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavfilter/avfilter.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 0c5c741787..580023ce8b 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -194,13 +194,18 @@ int avfilter_config_links(AVFilterContext *filter)
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)