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:
authorLuca Abeni <lucabe72@email.it>2007-11-16 10:59:41 +0300
committerLuca Abeni <lucabe72@email.it>2007-11-16 10:59:41 +0300
commit7ed19d7fbfc0dda44d401388db06b245f07d206f (patch)
tree1d834bdda316cba0989eb7481d53829731748f4a /libavformat/rtsp.c
parentb5298028b050d8c20d741c5219c1b0d2304c9391 (diff)
Remove the "AVRtpPayloadTypes[i].pt == i" assumption from RTP and RTSP
code (this is needed for supporting MPEG2 video in the RTP muxer) Originally committed as revision 11046 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 3dbb3e3aba..c494ebd3d8 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -167,11 +167,7 @@ static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st, int payl
} else {
/* We are in a standard case ( from http://www.iana.org/assignments/rtp-parameters) */
/* search into AVRtpPayloadTypes[] */
- for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i)
- if (!strcmp(buf, AVRtpPayloadTypes[i].enc_name) && (codec->codec_type == AVRtpPayloadTypes[i].codec_type)){
- codec->codec_id = AVRtpPayloadTypes[i].codec_id;
- break;
- }
+ codec->codec_id = ff_rtp_codec_id(buf, codec->codec_type);
}
c = avcodec_find_decoder(codec->codec_id);
@@ -443,7 +439,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
get_word(buf1, sizeof(buf1), &p); /* format list */
rtsp_st->sdp_payload_type = atoi(buf1);
- if (!strcmp(AVRtpPayloadTypes[rtsp_st->sdp_payload_type].enc_name, "MP2T")) {
+ if (!strcmp(ff_rtp_enc_name(rtsp_st->sdp_payload_type), "MP2T")) {
/* no corresponding stream */
} else {
st = av_new_stream(s, 0);