#include "log.h"
#include "scaler.h"
#include "player_video_frame.h"
+#include "frame_rate_change.h"
#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
} type = VIDEO;
for (list<shared_ptr<Piece> >::iterator i = _pieces.begin(); i != _pieces.end(); ++i) {
- if ((*i)->decoder->done ()) {
+ if ((*i)->decoder->done () || (*i)->content->length_after_trim() == 0) {
continue;
}
if (re) {
shared_ptr<const AudioBuffers> b = re->flush ();
if (b->frames ()) {
- process_audio (earliest, b, ac->audio_length (), true);
+ process_audio (
+ earliest,
+ b,
+ ac->audio_length() * ac->output_audio_frame_rate() / ac->content_audio_frame_rate(),
+ true
+ );
}
}
}
shared_ptr<VideoContent> content = dynamic_pointer_cast<VideoContent> (piece->content);
assert (content);
- FrameRateConversion frc (content->video_frame_rate(), _film->video_frame_rate());
+ FrameRateChange frc (content->video_frame_rate(), _film->video_frame_rate());
if (frc.skip && (frame % 2) == 1) {
return;
}