mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
tmv: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
4792dc1f1a
commit
01910fec68
@ -113,19 +113,13 @@ static int tmv_read_header(AVFormatContext *s)
|
||||
|
||||
ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
ast->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
|
||||
if (features & TMV_STEREO) {
|
||||
ast->codecpar->channels = 2;
|
||||
ast->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
|
||||
} else {
|
||||
ast->codecpar->channels = 1;
|
||||
ast->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
|
||||
}
|
||||
av_channel_layout_default(&ast->codecpar->ch_layout, !!(features & TMV_STEREO) + 1);
|
||||
ast->codecpar->bits_per_coded_sample = 8;
|
||||
ast->codecpar->bit_rate = ast->codecpar->sample_rate *
|
||||
ast->codecpar->bits_per_coded_sample;
|
||||
avpriv_set_pts_info(ast, 32, 1, ast->codecpar->sample_rate);
|
||||
|
||||
fps.num = ast->codecpar->sample_rate * ast->codecpar->channels;
|
||||
fps.num = ast->codecpar->sample_rate * ast->codecpar->ch_layout.nb_channels;
|
||||
fps.den = tmv->audio_chunk_size;
|
||||
av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user