History

lavfi: make ff_framequeue_skip_samples() more useful.

Instead of just updating statistics and leaving the work to the call site, have it actually do the work.

Nicolas George committed 9 years ago

Commit 383057f1 parent e05d2dd3 files · +33 −13Browse files

Showing the changes to libavfilter/framequeue.h (1 of 3 files). Show all

Unified · Split

libavfilter/framequeue.h+5−6
@@ -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 * This function must be used when the first frame was accessed using166 * 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 */
169static inline void ff_framequeue_skip_samples(FFFrameQueue *fq, size_t n)171void ff_framequeue_skip_samples(FFFrameQueue *fq, size_t samples, AVRational time_base);
170{
171 fq->total_samples_tail += n;
172}
173 172
174#endif /* AVFILTER_FRAMEQUEUE_H */173#endif /* AVFILTER_FRAMEQUEUE_H */

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