diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 18:25:12 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:36 -0300 |
commit | 620d151e5cb095c3406a06a476d4b0bfaf7f0182 (patch) | |
tree | 00dd1eca8d72cf227247ec0ca6a071c7157f3505 /libavformat/rtsp.c | |
parent | b76e878f5b64587afa584e16ed8353c26d9cf10f (diff) | |
download | ffmpeg-620d151e5cb095c3406a06a476d4b0bfaf7f0182.tar.gz |
rtp: 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/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 70c18941ca..5fa756bf5c 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -323,19 +323,19 @@ static int sdp_parse_rtpmap(AVFormatContext *s, case AVMEDIA_TYPE_AUDIO: av_log(s, AV_LOG_DEBUG, "audio codec set to: %s\n", c_name); par->sample_rate = RTSP_DEFAULT_AUDIO_SAMPLERATE; - par->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS; + par->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; if (i > 0) { par->sample_rate = i; avpriv_set_pts_info(st, 32, 1, par->sample_rate); get_word_sep(buf, sizeof(buf), "/", &p); i = atoi(buf); if (i > 0) - par->channels = i; + av_channel_layout_default(&par->ch_layout, i); } av_log(s, AV_LOG_DEBUG, "audio samplerate set to: %i\n", par->sample_rate); av_log(s, AV_LOG_DEBUG, "audio channels set to: %i\n", - par->channels); + par->ch_layout.nb_channels); break; case AVMEDIA_TYPE_VIDEO: av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name); |