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/avfilter.c (1 of 3 files). Show all

Unified · Split

libavfilter/avfilter.c+1−7
@@ -1235,13 +1235,7 @@ static int take_samples(AVFilterLink *link, unsigned min, unsigned max, · 1234 unmodified lines
12351235 frame = ff_framequeue_peek(&link->fifo, 0);
12361236 av_samples_copy(buf->extended_data, frame->extended_data, p, 0, n,
12371237 link->channels, link->format);
1238− frame->nb_samples -= n;
1239− av_samples_copy(frame->extended_data, frame->extended_data, 0, n,
1240− frame->nb_samples, link->channels, link->format);
1241− if (frame->pts != AV_NOPTS_VALUE)
1242− frame->pts += av_rescale_q(n, av_make_q(1, link->sample_rate), link->time_base);
1243− ff_framequeue_update_peeked(&link->fifo, 0);
1244− ff_framequeue_skip_samples(&link->fifo, n);
1238+ ff_framequeue_skip_samples(&link->fifo, n, link->time_base);
12451239 }
12461240
12471241 *rframe = buf;

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