forked from FFmpeg/FFmpeg
avfilter_graph_queue_command: Allow queueing commands out of order
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
37f9de59d1
commit
ea36c44e84
1 changed files with 5 additions and 2 deletions
|
@ -294,13 +294,16 @@ int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const
|
|||
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;
|
||||
while(*que) que = &(*que)->next;
|
||||
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;
|
||||
if(flags & AVFILTER_CMD_FLAG_ONE)
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue