Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-31 18:52:39 +0300
committerJames Almer <jamrial@gmail.com>2022-03-15 15:42:35 +0300
commitb9298dad940db1ac49658039a99f9308f57019c0 (patch)
tree0e32b9e8344c0630af90777efed9f55e9426fa7f /libavformat/nutdec.c
parenta1f1f56ef072e84f1708adffe5185edb58ac2a89 (diff)
nutdec: 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/nutdec.c')
-rw-r--r--libavformat/nutdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index f9ad2c0af1..6611fbc1d7 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -457,7 +457,7 @@ static int decode_stream_header(NUTContext *nut)
} else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
GET_V(st->codecpar->sample_rate, tmp > 0);
ffio_read_varlen(bc); // samplerate_den
- GET_V(st->codecpar->channels, tmp > 0);
+ GET_V(st->codecpar->ch_layout.nb_channels, tmp > 0);
}
if (skip_reserved(bc, end) || ffio_get_checksum(bc)) {
av_log(s, AV_LOG_ERROR,
@@ -961,8 +961,10 @@ static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int
if (!dst)
return AVERROR(ENOMEM);
bytestream_put_le32(&dst,
+#if FF_API_OLD_CHANNEL_LAYOUT
AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT*(!!channels) +
AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT*(!!channel_layout) +
+#endif
AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE*(!!sample_rate) +
AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS*(!!(width|height))
);