Unified · Split
| @@ -427,7 +427,15 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts) · 426 unmodified lines | |||
| 427 | int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags) | 427 | int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags) |
| 428 | { | 428 | { |
| 429 | if(!strcmp(cmd, "ping")){ | 429 | if(!strcmp(cmd, "ping")){ |
| 430 | char local_res[256] = {0}; | ||
| 431 | |||
| 432 | if (!res) { | ||
| 433 | res = local_res; | ||
| 434 | res_len = sizeof(local_res); | ||
| 435 | } | ||
| 430 | av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name); | 436 | av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name); |
| 437 | if (res == local_res) | ||
| 438 | av_log(filter, AV_LOG_INFO, "%s", res); | ||
| 431 | return 0; | 439 | return 0; |
| 432 | }else if(!strcmp(cmd, "enable")) { | 440 | }else if(!strcmp(cmd, "enable")) { |
| 433 | return set_enable_expr(filter, arg); | 441 | return set_enable_expr(filter, arg); |