Round sample rate calculations in audio FFmpeg examiner.
authorCarl Hetherington <cth@carlh.net>
Wed, 6 Jun 2018 15:07:16 +0000 (16:07 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 6 Jun 2018 15:07:16 +0000 (16:07 +0100)
src/lib/ffmpeg_examiner.cc

index 6c76ba5a433266591673cc34d645256fb6f1ed39..4223a4badaa80713c8fa28db1b0fec9f21b6f3d7 100644 (file)
@@ -72,7 +72,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                                                s->codec->codec->name,
                                                s->id,
                                                s->codec->sample_rate,
-                                               (double (_format_context->duration) / AV_TIME_BASE) * s->codec->sample_rate,
+                                               llrint ((double (_format_context->duration) / AV_TIME_BASE) * s->codec->sample_rate),
                                                s->codec->channels
                                                )
                                        )