mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-11-01 21:12:53 +08:00
lavf/dauddec: set timebase to 1/samplerate
Prevents lavf from generating inexact timestamps with the default timebase of 1/90000.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user