summaryrefslogtreecommitdiff
path: root/rotord/libavexporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/libavexporter.cpp')
-rw-r--r--rotord/libavexporter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/rotord/libavexporter.cpp b/rotord/libavexporter.cpp
index d9faa5b..7b6d1cf 100644
--- a/rotord/libavexporter.cpp
+++ b/rotord/libavexporter.cpp
@@ -56,12 +56,11 @@ bool libav::Exporter::record(std::string filename){
open_video(oc, video_codec, video_st);
if (audio_st) {
audioframesize=open_audio(oc, audio_codec, audio_st);
- audiostep=((float)audio_st->r_frame_rate.den)/audio_st->r_frame_rate.num;
- audiostep=((float)audioframesize)/44100.0f; //where to get the framesize from?????
+ audiostep=((float)audioframesize)/(audio_st->codec->sample_rate);
std::cerr << "opened audio codec with "<<audioframesize<<" frame size and "<<audiostep<<" seconds per frame"<<std::endl;
}
-
+
av_dump_format(oc, 0, filename.c_str(), 1);
// open the output file, if needed //