summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorRyan Martell <rdm4@martellventures.com>2006-11-16 08:48:05 +0000
committerGuillaume Poirier <gpoirier@mplayerhq.hu>2006-11-16 08:48:05 +0000
commit1ad20f96f2fe64a0af71ad346f3cc5f1c4086ea8 (patch)
tree5216c82103a31fc17503e0e2f78569283b11e923 /libavformat
parente4bb70838f0c3092a9b893f2210e7c303f0f2a4a (diff)
remove duplicate code, patch by Ryan Martell rdm4 A martellventures P com
Original thread: Date: 11/15/2006 05:15 PM Subject: [Ffmpeg-devel] [PATCH] rtsp.c minor cleanup Originally committed as revision 7095 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 4c99a17330..787cdd6851 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -319,18 +319,9 @@ static void sdp_parse_fmtp(AVStream *st, const char *p)
AVCodecContext *codec = st->codec;
rtp_payload_data_t *rtp_payload_data = &rtsp_st->rtp_payload_data;
- // TODO (Replace with rtsp_next_attr_and_value)
/* loop on each attribute */
- for(;;) {
- skip_spaces(&p);
- if (*p == '\0')
- break;
- get_word_sep(attr, sizeof(attr), "=", &p);
- if (*p == '=')
- p++;
- get_word_sep(value, sizeof(value), ";", &p);
- if (*p == ';')
- p++;
+ while(rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value)))
+ {
/* grab the codec extra_data from the config parameter of the fmtp line */
sdp_parse_fmtp_config(codec, attr, value);
/* Looking for a known attribute */