Browse code

avfilter: fix processing multiple commands per frame and filter

Found-by: Nicolas George
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2011/08/30 03:35:03
Showing 1 changed files
... ...
@@ -566,9 +566,10 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
566 566
     else
567 567
         link->cur_buf = picref;
568 568
 
569
-    if(cmd && cmd->time <= picref->pts * av_q2d(link->time_base)){
569
+    while(cmd && cmd->time <= picref->pts * av_q2d(link->time_base)){
570 570
         avfilter_process_command(link->dst, cmd->command, cmd->arg, 0, 0, cmd->flags);
571 571
         command_queue_pop(link->dst);
572
+        cmd= link->dst->command_queue;
572 573
     }
573 574
 
574 575
     start_frame(link, link->cur_buf);