# HG changeset patch # User gpoirier # Date 1163666885 0 # Node ID 958decd51c1fbdf9e215ca3ae5544ba4d6a30853 # Parent 7d1a53de280a89fbae5bef0a6d33d782a51703e3 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 diff -r 7d1a53de280a -r 958decd51c1f rtsp.c --- a/rtsp.c Thu Nov 16 07:33:25 2006 +0000 +++ b/rtsp.c Thu Nov 16 08:48:05 2006 +0000 @@ -319,18 +319,9 @@ 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 */