diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-05-13 11:11:26 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:33 -0300 |
commit | 2f18760840ee5db3de7326cdbd4732d37272cbe2 (patch) | |
tree | 4e247be972733bb63af8188df72d299a2253a0b8 /libavformat/gdv.c | |
parent | 201d6c1355f8041d68d55b690093a57287b2d060 (diff) |
gdv: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/gdv.c')
-rw-r--r-- | libavformat/gdv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/gdv.c b/libavformat/gdv.c index b20691a2a4..f8a8f50351 100644 --- a/libavformat/gdv.c +++ b/libavformat/gdv.c @@ -99,7 +99,7 @@ static int gdv_read_header(AVFormatContext *ctx) ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; ast->codecpar->codec_tag = 0; ast->codecpar->sample_rate = avio_rl16(pb); - ast->codecpar->channels = 1 + !!(snd_flags & 2); + ast->codecpar->ch_layout.nb_channels = 1 + !!(snd_flags & 2); if (snd_flags & 8) { ast->codecpar->codec_id = AV_CODEC_ID_GREMLIN_DPCM; } else { @@ -108,7 +108,8 @@ static int gdv_read_header(AVFormatContext *ctx) avpriv_set_pts_info(ast, 64, 1, ast->codecpar->sample_rate); gdv->audio_size = (ast->codecpar->sample_rate / fps) * - ast->codecpar->channels * (1 + !!(snd_flags & 4)) / (1 + !!(snd_flags & 8)); + ast->codecpar->ch_layout.nb_channels * + (1 + !!(snd_flags & 4)) / (1 + !!(snd_flags & 8)); gdv->is_audio = 1; } else { avio_skip(pb, 2); |