[FFmpeg-devel] [PATCH] rtp:fix assigning dynamic payload type to L16 with non standard freq sampling
Adriano Pallavicino
adrianopallavicino at gmail.com
Tue Jul 17 14:24:45 CEST 2012
From: Adriano Pallavicino <adriano.pallavicino at gmail.com>
---
libavformat/rtp.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index a5484ae..bfb6030 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -110,9 +110,10 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec)
!fmt->oformat->priv_class ||
!av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
continue;
- if (codec->codec_id == CODEC_ID_PCM_S16BE)
- if (codec->channels != AVRtpPayloadTypes[i].audio_channels)
- continue;
+ if (codec->codec_id == CODEC_ID_PCM_S16BE &&
+ (codec->sample_rate != AVRtpPayloadTypes[i].clock_rate ||
+ codec->channels != AVRtpPayloadTypes[i].audio_channels))
+ continue;
return AVRtpPayloadTypes[i].pt;
}
--
1.7.10.4
More information about the ffmpeg-devel
mailing list