History

avfilter_graph_queue_command: Allow queueing commands out of order

Michael Niedermayer committed 15 years ago

Commit ea36c441 parent 37f9de51 file · +5 −2Browse files

Unified · Split

libavfilter/avfiltergraph.c+5−2
@@ -294,13 +294,16 @@ int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const · 293 unmodified lines
294 for (i = 0; i < graph->filter_count; i++) {294 for (i = 0; i < graph->filter_count; i++) {
295 AVFilterContext *filter = graph->filters[i];295 AVFilterContext *filter = graph->filters[i];
296 if(filter && (!strcmp(target, "all") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name))){296 if(filter && (!strcmp(target, "all") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name))){
297 AVFilterCommand **que = &filter->command_queue;297 AVFilterCommand **que = &filter->command_queue, *next;
298 while(*que) que = &(*que)->next;298 while(*que && (*que)->time <= ts)
299 que = &(*que)->next;
300 next= *que;
299 *que= av_mallocz(sizeof(AVFilterCommand));301 *que= av_mallocz(sizeof(AVFilterCommand));
300 (*que)->command = av_strdup(command);302 (*que)->command = av_strdup(command);
301 (*que)->arg = av_strdup(arg);303 (*que)->arg = av_strdup(arg);
302 (*que)->time = ts;304 (*que)->time = ts;
303 (*que)->flags = flags;305 (*que)->flags = flags;
306 (*que)->next = next;
304 if(flags & AVFILTER_CMD_FLAG_ONE)307 if(flags & AVFILTER_CMD_FLAG_ONE)
305 return 0;308 return 0;
306 }309 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t