summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-04-24 10:55:43 +0200
committerAnton Khirnov <anton@khirnov.net>2023-04-28 14:31:55 +0200
commitaf8be7bf437ebeb10911ba30c8cf696a0da9657c (patch)
tree5f2a9a881ab617bc1e60af2a82ecd2d565fe0c0d /libavformat
parent78f95f10887f7273a861268e9e6b93411f59ed20 (diff)
downloadffmpeg-af8be7bf437ebeb10911ba30c8cf696a0da9657c.tar.gz
lavf/dauddec: set timebase to 1/samplerate
Prevents lavf from generating inexact timestamps with the default timebase of 1/90000.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/dauddec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/dauddec.c b/libavformat/dauddec.c
index 0cbf7e4e36..7e411091ec 100644
--- a/libavformat/dauddec.c
+++ b/libavformat/dauddec.c
@@ -21,6 +21,7 @@
#include "libavutil/channel_layout.h"
#include "avformat.h"
+#include "internal.h"
static int daud_header(AVFormatContext *s) {
AVStream *st = avformat_new_stream(s, NULL);
@@ -34,6 +35,9 @@ static int daud_header(AVFormatContext *s) {
st->codecpar->bit_rate = 3 * 6 * 96000 * 8;
st->codecpar->block_align = 3 * 6;
st->codecpar->bits_per_coded_sample = 24;
+
+ avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
+
return 0;
}