Browse Source

avfilter: dont crash on filters with NULL instance names.

Found-by: Rolf Siegrist
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Michael Niedermayer 13 years ago
parent
commit
c0323b9c9b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/avfiltergraph.c

+ 1
- 1
libavfilter/avfiltergraph.c View File

@@ -272,7 +272,7 @@ int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const

for (i = 0; i < graph->filter_count; i++) {
AVFilterContext *filter = graph->filters[i];
if(!strcmp(target, "all") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name)){
if(!strcmp(target, "all") || (filter->name && !strcmp(target, filter->name)) || !strcmp(target, filter->filter->name)){
r = avfilter_process_command(filter, cmd, arg, res, res_len, flags);
if(r != AVERROR(ENOSYS)) {
if((flags & AVFILTER_CMD_FLAG_ONE) || r<0)


Loading…
Cancel
Save