Commit c0323b9c authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter: dont crash on filters with NULL instance names.

Found-by: Rolf Siegrist
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2fd49019
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment