diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 17:42:14 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:34 -0300 |
commit | eb2634339b8c89df8850e23e2c4bdbe24ee68614 (patch) | |
tree | 2deca1963880457395b42e0207493b866e58244a /libavformat/mpc8.c | |
parent | 930850b230dccf675919faa996fb3ec815dc70e7 (diff) | |
download | ffmpeg-eb2634339b8c89df8850e23e2c4bdbe24ee68614.tar.gz |
mpc8: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/mpc8.c')
-rw-r--r-- | libavformat/mpc8.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index 0cf46b36a0..03c67907b9 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -230,6 +230,7 @@ static int mpc8_read_header(AVFormatContext *s) AVIOContext *pb = s->pb; AVStream *st; int tag = 0, ret; + int channels; int64_t size, pos; c->header_pos = avio_tell(pb); @@ -273,7 +274,8 @@ static int mpc8_read_header(AVFormatContext *s) if ((ret = ff_get_extradata(s, st->codecpar, pb, 2)) < 0) return ret; - st->codecpar->channels = (st->codecpar->extradata[1] >> 4) + 1; + channels = (st->codecpar->extradata[1] >> 4) + 1; + st->codecpar->ch_layout.nb_channels = channels; st->codecpar->sample_rate = mpc8_rate[st->codecpar->extradata[0] >> 5]; avpriv_set_pts_info(st, 64, 1152 << (st->codecpar->extradata[1]&3)*2, st->codecpar->sample_rate); st->start_time = 0; |