[FFmpeg-devel] [PATCH] ffprobe: do not print section_sep if it is not defined in the writer

Stefano Sabatini stefasab at gmail.com
Sun Sep 25 02:09:11 CEST 2011


Avoid the need of having to specify it in the writer definitions.
---
 ffprobe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffprobe.c b/ffprobe.c
index cabc8c8..d12c98c 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -560,7 +560,7 @@ static int get_writer(const char *name)
         show_ ## name (w, fmt_ctx);                           \
         if (w->print_section_end)                             \
             w->print_section_end(#name, multiple_entries);    \
-        if (left)                                             \
+        if (left && w->section_sep)                           \
             printf("%s", w->section_sep);                     \
     }                                                         \
 } while (0)
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list