avfilter/graphdump: Fix pointer to local outside scope

Fixes CID1194435
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 18af0ce62d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-28 04:01:50 +02:00
parent aaf6ddfa4d
commit 2a543e58ec
1 changed files with 2 additions and 1 deletions

View File

@ -31,9 +31,10 @@ static int print_link_prop(AVBPrint *buf, AVFilterLink *link)
{
char *format;
char layout[64];
AVBPrint dummy_buffer = { 0 };
if (!buf)
buf = &(AVBPrint){ 0 }; /* dummy buffer */
buf = &dummy_buffer;
switch (link->type) {
case AVMEDIA_TYPE_VIDEO:
format = av_x_if_null(av_get_pix_fmt_name(link->format), "?");