comparison rtsp.c @ 1514:958decd51c1f libavformat

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
author gpoirier
date Thu, 16 Nov 2006 08:48:05 +0000
parents 49d5a5ca2987
children 92afee454599
comparison
equal deleted inserted replaced
1513:7d1a53de280a 1514:958decd51c1f
317 317
318 RTSPStream *rtsp_st = st->priv_data; 318 RTSPStream *rtsp_st = st->priv_data;
319 AVCodecContext *codec = st->codec; 319 AVCodecContext *codec = st->codec;
320 rtp_payload_data_t *rtp_payload_data = &rtsp_st->rtp_payload_data; 320 rtp_payload_data_t *rtp_payload_data = &rtsp_st->rtp_payload_data;
321 321
322 // TODO (Replace with rtsp_next_attr_and_value)
323 /* loop on each attribute */ 322 /* loop on each attribute */
324 for(;;) { 323 while(rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value)))
325 skip_spaces(&p); 324 {
326 if (*p == '\0')
327 break;
328 get_word_sep(attr, sizeof(attr), "=", &p);
329 if (*p == '=')
330 p++;
331 get_word_sep(value, sizeof(value), ";", &p);
332 if (*p == ';')
333 p++;
334 /* grab the codec extra_data from the config parameter of the fmtp line */ 325 /* grab the codec extra_data from the config parameter of the fmtp line */
335 sdp_parse_fmtp_config(codec, attr, value); 326 sdp_parse_fmtp_config(codec, attr, value);
336 /* Looking for a known attribute */ 327 /* Looking for a known attribute */
337 for (i = 0; attr_names[i].str; ++i) { 328 for (i = 0; attr_names[i].str; ++i) {
338 if (!strcasecmp(attr, attr_names[i].str)) { 329 if (!strcasecmp(attr, attr_names[i].str)) {