emit_video (*i, sub);
}
+
+ ++_video_frames_in;
}
void
Decoder::emit_video (shared_ptr<Image> image, shared_ptr<Subtitle> sub)
{
TIMING ("Decoder emits %1", _video_frames_out);
- Video (image, _video_frames_out, sub);
+ Video (image, _video_frames_in, sub);
++_video_frames_out;
_last_image = image;
_last_subtitle = sub;
* @param frames Delay in frames, +ve to move audio later.
*/
DelayLine::DelayLine (int channels, int frames)
+ : _negative_delay_remaining (0)
{
if (frames > 0) {
/* We need a buffer to keep some data in */
void
AudioBuffers::move (int from, int to, int frames)
{
+ if (frames == 0) {
+ return;
+ }
+
+ assert (from >= 0);
+ assert (from < _frames);
+ assert (to >= 0);
+ assert (to < _frames);
+ assert (frames > 0);
+ assert (frames <= _frames);
+ assert ((from + frames) <= _frames);
+ assert ((to + frames) <= _frames);
+
for (int i = 0; i < _channels; ++i) {
memmove (_data[i] + to, _data[i] + from, frames * sizeof(float));
}