ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
AVMEDIA_TYPE_VIDEO;
- if ((ret = ctx->filter->query_formats(ctx)) < 0)
+ if ((ret = ctx->filter->query_formats(ctx)) < 0) {
+ av_log(ctx, AV_LOG_ERROR, "Query format failed for '%s': %s\n",
+ ctx->name, av_err2str(ret));
return ret;
+ }
formats = ff_all_formats(type);
if (!formats)
if (filter->nb_inputs){
for (j = 0; j < filter->nb_inputs; j++){
if(filter->inputs[j]->in_formats && filter->inputs[j]->in_formats->format_count == 1) {
- pick_format(filter->inputs[j], NULL);
+ if ((ret = pick_format(filter->inputs[j], NULL)) < 0)
+ return ret;
change = 1;
}
}
if (filter->nb_outputs){
for (j = 0; j < filter->nb_outputs; j++){
if(filter->outputs[j]->in_formats && filter->outputs[j]->in_formats->format_count == 1) {
- pick_format(filter->outputs[j], NULL);
+ if ((ret = pick_format(filter->outputs[j], NULL)) < 0)
+ return ret;
change = 1;
}
}
if (filter->nb_inputs && filter->nb_outputs && filter->inputs[0]->format>=0) {
for (j = 0; j < filter->nb_outputs; j++) {
if(filter->outputs[j]->format<0) {
- pick_format(filter->outputs[j], filter->inputs[0]);
+ if ((ret = pick_format(filter->outputs[j], filter->inputs[0])) < 0)
+ return ret;
change = 1;
}
}
for (i = 0; i < graph->filter_count; i++) {
AVFilterContext *filter = graph->filters[i];
if(filter && (!strcmp(target, "all") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name))){
- AVFilterCommand **que = &filter->command_queue, *next;
- while(*que && (*que)->time <= ts)
- que = &(*que)->next;
- next= *que;
- *que= av_mallocz(sizeof(AVFilterCommand));
- (*que)->command = av_strdup(command);
- (*que)->arg = av_strdup(arg);
- (*que)->time = ts;
- (*que)->flags = flags;
- (*que)->next = next;
+ AVFilterCommand **queue = &filter->command_queue, *next;
+ while (*queue && (*queue)->time <= ts)
+ queue = &(*queue)->next;
+ next = *queue;
+ *queue = av_mallocz(sizeof(AVFilterCommand));
+ (*queue)->command = av_strdup(command);
+ (*queue)->arg = av_strdup(arg);
+ (*queue)->time = ts;
+ (*queue)->flags = flags;
+ (*queue)->next = next;
if(flags & AVFILTER_CMD_FLAG_ONE)
return 0;
}