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
294294 for (i = 0; i < graph->filter_count; i++) {
295295 AVFilterContext *filter = graph->filters[i];
296296 if(filter && (!strcmp(target, "all") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name))){
297− AVFilterCommand **que = &filter->command_queue;
298− while(*que) que = &(*que)->next;
297+ AVFilterCommand **que = &filter->command_queue, *next;
298+ while(*que && (*que)->time <= ts)
299+ que = &(*que)->next;
300+ next= *que;
299301 *que= av_mallocz(sizeof(AVFilterCommand));
300302 (*que)->command = av_strdup(command);
301303 (*que)->arg = av_strdup(arg);
302304 (*que)->time = ts;
303305 (*que)->flags = flags;
306+ (*que)->next = next;
304307 if(flags & AVFILTER_CMD_FLAG_ONE)
305308 return 0;
306309 }

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