| 706 | 706 | |
| 707 | 707 | static void rtsp_parse_rtp_info(RTSPState *rt, const char *p) |
| 708 | 708 | { |
| 709 | 709 | int read = 0; |
| 710 | 710 | char key[20], value[1024], url[1024] = ""; |
| 711 | 711 | uint32_t seq = 0, rtptime = 0; |
| 712 | 712 | |
| 713 | 713 | for (;;) { |
| 714 | 714 | p += strspn(p, SPACE_CHARS); |
| 715 | 715 | if (!*p) |
| 716 | 716 | break; |
| 717 | 717 | get_word_sep(key, sizeof(key), "=", &p); |
| 718 | 718 | if (*p != '=') |
| 719 | 719 | break; |
| 720 | 720 | p++; |
| 721 | 721 | get_word_sep(value, sizeof(value), ";, ", &p); |
| 722 | 722 | read++; |
| 723 | 723 | if (!strcmp(key, "url")) |
| 724 | 724 | av_strlcpy(url, value, sizeof(url)); |
| 725 | 725 | else if (!strcmp(key, "seq")) |
| 729 | 729 | if (*p == ',') { |
| 730 | 730 | handle_rtp_info(rt, url, seq, rtptime); |
| 731 | 731 | url[0] = '\0'; |
| 732 | 732 | seq = rtptime = 0; |
| 733 | 733 | read = 0; |
| 734 | 734 | } |
| 735 | 735 | if (*p) |
| 736 | 736 | p++; |
| 737 | 737 | } |
| 738 | 738 | if (read > 0) |
| 739 | 739 | handle_rtp_info(rt, url, seq, rtptime); |
| 740 | 740 | } |
| 741 | 741 | |
| 742 | 742 | void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf, |
| 743 | 743 | RTSPState *rt, const char *method) |
| 744 | 744 | { |
| 745 | 745 | const char *p; |
| 746 | 746 | |
| 747 | 747 | /* NOTE: we do case independent match for broken servers */ |
| 748 | 748 | p = buf; |