many fixes and improvements

This commit is contained in:
itsmattkc
2018-07-19 13:02:35 +01:00
parent 33f8d7274a
commit c375cd3ee7
10 changed files with 239 additions and 228 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ Media::~Media() {
audio_tracks.clear();
}
long Media::get_length_in_frames(float frame_rate) {
return ceil((float) length / (float) AV_TIME_BASE * frame_rate);
long Media::get_length_in_frames(double frame_rate) {
return ceil(((double) length / (double) AV_TIME_BASE) * frame_rate);
}
MediaStream* Media::get_stream_from_file_index(int index) {