Browse code

afq: update remaining samples variable.

Fixes Ticket1785 (opusenc used this variable)

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

Michael Niedermayer authored on 2012/10/04 09:36:58
Showing 1 changed files
... ...
@@ -95,6 +95,7 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts,
95 95
         if(afq->frames[i].pts != AV_NOPTS_VALUE)
96 96
             afq->frames[i].pts      += n;
97 97
     }
98
+    afq->remaining_samples -= removed_samples;
98 99
     i -= i && afq->frames[i-1].duration;
99 100
     memmove(afq->frames, afq->frames + i, sizeof(*afq->frames) * (afq->frame_count - i));
100 101
     afq->frame_count -= i;