summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c6
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);