Instead of just updating statistics and leaving the work to the call site, have it actually do the work.
Showing the changes to libavfilter/framequeue.h (1 of 3 files). Show all
Unified · Split
| @@ -161,14 +161,13 @@ static inline void ff_framequeue_update_peeked(FFFrameQueue *fq, size_t idx) · 160 unmodified lines | ||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
| 164 | − * Update the sample count in the queue. | |
| 164 | + * Skip samples from the first frame in the queue. | |
| 165 | 165 | * |
| 166 | 166 | * This function must be used when the first frame was accessed using |
| 167 | − * ff_framequeue_peek() and samples were removed from it. | |
| 167 | + * ff_framequeue_peek() and samples were consumed from it. | |
| 168 | + * It adapts the data pointers and timestamps of the head frame to account | |
| 169 | + * for the skipped samples. | |
| 168 | 170 | */ |
| 169 | −static inline void ff_framequeue_skip_samples(FFFrameQueue *fq, size_t n) | |
| 170 | −{ | |
| 171 | − fq->total_samples_tail += n; | |
| 172 | −} | |
| 171 | +void ff_framequeue_skip_samples(FFFrameQueue *fq, size_t samples, AVRational time_base); | |
| 173 | 172 | |
| 174 | 173 | #endif /* AVFILTER_FRAMEQUEUE_H */ |