You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
vqa: use 1/sample_rate as the audio stream time base
This commit is contained in:
@@ -122,7 +122,6 @@ static int wsvqa_read_header(AVFormatContext *s,
|
|||||||
if (!st)
|
if (!st)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
st->start_time = 0;
|
st->start_time = 0;
|
||||||
avpriv_set_pts_info(st, 33, 1, VQA_FRAMERATE);
|
|
||||||
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
|
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||||
if (AV_RL16(&header[0]) == 1)
|
if (AV_RL16(&header[0]) == 1)
|
||||||
st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
|
st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
|
||||||
@@ -140,6 +139,8 @@ static int wsvqa_read_header(AVFormatContext *s,
|
|||||||
st->codec->bits_per_coded_sample / 4;
|
st->codec->bits_per_coded_sample / 4;
|
||||||
st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
|
st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
|
||||||
|
|
||||||
|
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
|
||||||
|
|
||||||
wsvqa->audio_stream_index = st->index;
|
wsvqa->audio_stream_index = st->index;
|
||||||
wsvqa->audio_samplerate = st->codec->sample_rate;
|
wsvqa->audio_samplerate = st->codec->sample_rate;
|
||||||
wsvqa->audio_channels = st->codec->channels;
|
wsvqa->audio_channels = st->codec->channels;
|
||||||
|
Reference in New Issue
Block a user