- int i_field = 0;
- /* o field is <username> <session id> <version>
- * <network type> <address type> <address> */
-
-#define GET_FIELD( store ) \
- psz_eof = strchr( psz_parse, ' ' ); \
- if( psz_eof ) \
- { \
- *psz_eof=0; store = strdup( psz_parse ); \
- } \
- else \
- { \
- if( i_field != 5 ) \
- { \
- b_invalid = VLC_TRUE; break; \
- } \
- else \
- { \
- store = strdup( psz_parse ); \
- } \
- }; \
- psz_parse = psz_eof + 1; i_field++;
-
-
- psz_parse = &psz_sdp[2];
- GET_FIELD( p_sdp->psz_username );
- GET_FIELD( psz_sess_id );
-
- p_sdp->i_session_id = atoll( psz_sess_id );
-
- FREENULL( psz_sess_id );
-
- GET_FIELD( psz_sess_id );
- FREENULL( psz_sess_id );
-
- GET_FIELD( p_sdp->psz_network_type );
- GET_FIELD( p_sdp->psz_address_type );
- GET_FIELD( p_sdp->psz_address );