1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00

Re-indent to more closely follow general coding standards used in other

parts of FFmpeg. Also change a starting condition; while (condition) {
... bla = bla->next; } loop into a proper for() loop.

Originally committed as revision 21071 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Ronald S. Bultje 2010-01-07 22:41:14 +00:00
parent 59043195d4
commit c896580087

View File

@ -91,9 +91,9 @@ static void get_word(char *buf, int buf_size, const char **pp)
get_word_until_chars(buf, buf_size, SPACE_CHARS, pp);
}
/* parse the rtpmap description: <codec_name>/<clock_rate>[/<other
params>] */
static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st, int payload_type, const char *p)
/* parse the rtpmap description: <codec_name>/<clock_rate>[/<other params>] */
static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st,
int payload_type, const char *p)
{
char buf[256];
int i;
@ -101,23 +101,24 @@ static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st, int payl
const char *c_name;
/* Loop into AVRtpDynamicPayloadTypes[] and AVRtpPayloadTypes[] and
see if we can handle this kind of payload */
* see if we can handle this kind of payload. */
get_word_sep(buf, sizeof(buf), "/", &p);
if (payload_type >= RTP_PT_PRIVATE) {
RTPDynamicProtocolHandler *handler= RTPFirstDynamicPayloadHandler;
while(handler) {
if (!strcasecmp(buf, handler->enc_name) && (codec->codec_type == handler->codec_type)) {
RTPDynamicProtocolHandler *handler;
for (handler = RTPFirstDynamicPayloadHandler;
handler; handler = handler->next) {
if (!strcasecmp(buf, handler->enc_name) &&
codec->codec_type == handler->codec_type) {
codec->codec_id = handler->codec_id;
rtsp_st->dynamic_handler = handler;
if(handler->open) {
if (handler->open)
rtsp_st->dynamic_protocol_context = handler->open();
}
break;
}
handler= handler->next;
}
} else {
/* We are in a standard case ( from http://www.iana.org/assignments/rtp-parameters) */
/* We are in a standard case
* (from http://www.iana.org/assignments/rtp-parameters). */
/* search into AVRtpPayloadTypes[] */
codec->codec_id = ff_rtp_codec_id(buf, codec->codec_type);
}
@ -142,11 +143,15 @@ static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st, int payl
i = atoi(buf);
if (i > 0)
codec->channels = i;
// TODO: there is a bug here; if it is a mono stream, and less than 22000Hz, faad upconverts to stereo and twice the
// frequency. No problem, but the sample rate is being set here by the sdp line. Upcoming patch forthcoming. (rdm)
// TODO: there is a bug here; if it is a mono stream, and
// less than 22000Hz, faad upconverts to stereo and twice
// the frequency. No problem, but the sample rate is being
// set here by the sdp line. Patch on its way. (rdm)
}
av_log(codec, AV_LOG_DEBUG, " audio samplerate set to : %i\n", codec->sample_rate);
av_log(codec, AV_LOG_DEBUG, " audio channels set to : %i\n", codec->channels);
av_log(codec, AV_LOG_DEBUG, "audio samplerate set to: %i\n",
codec->sample_rate);
av_log(codec, AV_LOG_DEBUG, "audio channels set to: %i\n",
codec->channels);
break;
case CODEC_TYPE_VIDEO:
av_log(codec, AV_LOG_DEBUG, "video codec set to: %s\n", c_name);
@ -160,7 +165,7 @@ static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st, int payl
return -1;
}
/* return the length and optionnaly the data */
/* return the length and optionally the data */
static int hex_to_data(uint8_t *data, const char *p)
{
int c, len, v;
@ -227,19 +232,26 @@ typedef struct {
#define ATTR_NAME_TYPE_STR 1
static const AttrNameMap attr_names[]=
{
{"SizeLength", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, sizelength)},
{"IndexLength", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, indexlength)},
{"IndexDeltaLength", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, indexdeltalength)},
{"profile-level-id", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, profile_level_id)},
{"StreamType", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, streamtype)},
{"mode", ATTR_NAME_TYPE_STR, offsetof(RTPPayloadData, mode)},
{ "SizeLength", ATTR_NAME_TYPE_INT,
offsetof(RTPPayloadData, sizelength) },
{ "IndexLength", ATTR_NAME_TYPE_INT,
offsetof(RTPPayloadData, indexlength) },
{ "IndexDeltaLength", ATTR_NAME_TYPE_INT,
offsetof(RTPPayloadData, indexdeltalength) },
{ "profile-level-id", ATTR_NAME_TYPE_INT,
offsetof(RTPPayloadData, profile_level_id) },
{ "StreamType", ATTR_NAME_TYPE_INT,
offsetof(RTPPayloadData, streamtype) },
{ "mode", ATTR_NAME_TYPE_STR,
offsetof(RTPPayloadData, mode) },
{ NULL, -1, -1 },
};
/** parse the attribute line from the fmtp a line of an sdp resonse. This is broken out as a function
* because it is used in rtp_h264.c, which is forthcoming.
*/
int rtsp_next_attr_and_value(const char **p, char *attr, int attr_size, char *value, int value_size)
/* parse the attribute line from the fmtp a line of an sdp resonse. This
* is broken out as a function because it is used in rtp_h264.c, which is
* forthcoming. */
int rtsp_next_attr_and_value(const char **p, char *attr, int attr_size,
char *value, int value_size)
{
skip_spaces(p);
if (**p) {
@ -262,24 +274,26 @@ static void sdp_parse_fmtp(AVStream *st, const char *p)
* encoded, giving a 12KB * (4/3) = 16KB FMTP line. */
char value[16384];
int i;
RTSPStream *rtsp_st = st->priv_data;
AVCodecContext *codec = st->codec;
RTPPayloadData *rtp_payload_data = &rtsp_st->rtp_payload_data;
/* loop on each attribute */
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 */
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, rtsp_st->dynamic_protocol_context,
attr, value);
/* Looking for a known attribute */
for (i = 0; attr_names[i].str; ++i) {
if (!strcasecmp(attr, attr_names[i].str)) {
if (attr_names[i].type == ATTR_NAME_TYPE_INT)
*(int *)((char *)rtp_payload_data + attr_names[i].offset) = atoi(value);
else if (attr_names[i].type == ATTR_NAME_TYPE_STR)
*(char **)((char *)rtp_payload_data + attr_names[i].offset) = av_strdup(value);
if (attr_names[i].type == ATTR_NAME_TYPE_INT) {
*(int *)((char *)rtp_payload_data +
attr_names[i].offset) = atoi(value);
} else if (attr_names[i].type == ATTR_NAME_TYPE_STR)
*(char **)((char *)rtp_payload_data +
attr_names[i].offset) = av_strdup(value);
}
}
}
@ -419,7 +433,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
}
}
/* put a default control url */
av_strlcpy(rtsp_st->control_url, s->filename, sizeof(rtsp_st->control_url));
av_strlcpy(rtsp_st->control_url, s->filename,
sizeof(rtsp_st->control_url));
break;
case 'a':
if (av_strstart(p, "control:", &p) && s->nb_streams > 0) {
@ -429,14 +444,17 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
rtsp_st = st->priv_data;
/* XXX: may need to add full url resolution */
url_split(proto, sizeof(proto), NULL, 0, NULL, 0, NULL, NULL, 0, p);
url_split(proto, sizeof(proto), NULL, 0, NULL, 0,
NULL, NULL, 0, p);
if (proto[0] == '\0') {
/* relative control URL */
av_strlcat(rtsp_st->control_url, "/", sizeof(rtsp_st->control_url));
av_strlcat(rtsp_st->control_url, p, sizeof(rtsp_st->control_url));
} else {
av_strlcpy(rtsp_st->control_url, p, sizeof(rtsp_st->control_url));
}
av_strlcat(rtsp_st->control_url, "/",
sizeof(rtsp_st->control_url));
av_strlcat(rtsp_st->control_url, p,
sizeof(rtsp_st->control_url));
} else
av_strlcpy(rtsp_st->control_url, p,
sizeof(rtsp_st->control_url));
} else if (av_strstart(p, "rtpmap:", &p) && s->nb_streams > 0) {
/* NOTE: rtpmap is only supported AFTER the 'm=' tag */
get_word(buf1, sizeof(buf1), &p);
@ -452,14 +470,12 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
st = s->streams[i];
rtsp_st = st->priv_data;
if (rtsp_st->sdp_payload_type == payload_type) {
if(rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->parse_sdp_a_line) {
if(!rtsp_st->dynamic_handler->parse_sdp_a_line(s, i, rtsp_st->dynamic_protocol_context, buf)) {
if (!(rtsp_st->dynamic_handler &&
rtsp_st->dynamic_handler->parse_sdp_a_line &&
rtsp_st->dynamic_handler->parse_sdp_a_line(s,
i, rtsp_st->dynamic_protocol_context, buf)))
sdp_parse_fmtp(st, p);
}
} else {
sdp_parse_fmtp(st, p);
}
}
}
} else if (av_strstart(p, "framesize:", &p)) {
// let dynamic protocol handlers have a stab at the line.
@ -468,11 +484,11 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
for (i = 0; i < s->nb_streams; i++) {
st = s->streams[i];
rtsp_st = st->priv_data;
if (rtsp_st->sdp_payload_type == payload_type) {
if(rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->parse_sdp_a_line) {
rtsp_st->dynamic_handler->parse_sdp_a_line(s, i, rtsp_st->dynamic_protocol_context, buf);
}
}
if (rtsp_st->sdp_payload_type == payload_type &&
rtsp_st->dynamic_handler &&
rtsp_st->dynamic_handler->parse_sdp_a_line)
rtsp_st->dynamic_handler->parse_sdp_a_line(s, i,
rtsp_st->dynamic_protocol_context, buf);
}
} else if (av_strstart(p, "range:", &p)) {
int64_t start, end;
@ -480,7 +496,9 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
// this is so that seeking on a streamed file can work.
rtsp_parse_range_npt(p, &start, &end);
s->start_time = start;
s->duration= (end==AV_NOPTS_VALUE)?AV_NOPTS_VALUE:end-start; // AV_NOPTS_VALUE means live broadcast (and can't seek)
/* AV_NOPTS_VALUE means live broadcast (and can't seek) */
s->duration = (end == AV_NOPTS_VALUE) ?
AV_NOPTS_VALUE : end - start;
} else if (av_strstart(p, "IsRealDataType:integer;",&p)) {
if (atoi(p) == 1)
rt->transport = RTSP_TRANSPORT_RDT;
@ -494,7 +512,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
rtsp_st = s->streams[s->nb_streams - 1]->priv_data;
if (rtsp_st->dynamic_handler &&
rtsp_st->dynamic_handler->parse_sdp_a_line)
rtsp_st->dynamic_handler->parse_sdp_a_line(s, s->nb_streams - 1,
rtsp_st->dynamic_handler->parse_sdp_a_line(s,
s->nb_streams - 1,
rtsp_st->dynamic_protocol_context, buf);
}
}
@ -563,7 +582,8 @@ static void rtsp_close_streams(RTSPState *rt)
if (rtsp_st->rtp_handle)
url_close(rtsp_st->rtp_handle);
if (rtsp_st->dynamic_handler && rtsp_st->dynamic_protocol_context)
rtsp_st->dynamic_handler->close(rtsp_st->dynamic_protocol_context);
rtsp_st->dynamic_handler->close(
rtsp_st->dynamic_protocol_context);
}
}
av_free(rt->rtsp_streams);
@ -574,8 +594,7 @@ static void rtsp_close_streams(RTSPState *rt)
av_freep(&rt->auth_b64);
}
static int
rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
{
RTSPState *rt = s->priv_data;
AVStream *st = NULL;
@ -819,9 +838,9 @@ static void rtsp_skip_packet(AVFormatContext *s)
* @returns 1 if a data packets is ready to be received, -1 on error,
* and 0 on success.
*/
static int
rtsp_read_reply (AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char **content_ptr, int return_on_interleaved_data)
static int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char **content_ptr,
int return_on_interleaved_data)
{
RTSPState *rt = s->priv_data;
char buf[4096], buf1[1024], *q;
@ -895,11 +914,11 @@ rtsp_read_reply (AVFormatContext *s, RTSPMessageHeader *reply,
/* EOS */
if (reply->notice == 2101 /* End-of-Stream Reached */ ||
reply->notice == 2104 /* Start-of-Stream Reached */ ||
reply->notice == 2306 /* Continuous Feed Terminated */)
reply->notice == 2306 /* Continuous Feed Terminated */) {
rt->state = RTSP_STATE_IDLE;
else if (reply->notice >= 4400 && reply->notice < 5500)
} else if (reply->notice >= 4400 && reply->notice < 5500) {
return AVERROR(EIO); /* data or server error */
else if (reply->notice == 2401 /* Ticket Expired */ ||
} else if (reply->notice == 2401 /* Ticket Expired */ ||
(reply->notice >= 5500 && reply->notice < 5600) /* end of term */ )
return AVERROR(EPERM);
@ -945,8 +964,7 @@ static void rtsp_send_cmd (AVFormatContext *s,
/**
* @returns 0 on success, <0 on error, 1 if protocol is unavailable.
*/
static int
make_setup_request (AVFormatContext *s, const char *host, int port,
static int make_setup_request(AVFormatContext *s, const char *host, int port,
int lower_transport, const char *real_challenge)
{
RTSPState *rt = s->priv_data;
@ -966,7 +984,7 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
/* for each stream, make the setup request */
/* XXX: we assume the same server is used for the control of each
RTSP stream */
* RTSP stream */
for (j = RTSP_RTP_PORT_MIN, i = 0; i < rt->nb_rtsp_streams; ++i) {
char transport[2048];
@ -983,7 +1001,8 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
for (rtx = 0; rtx < rt->nb_rtsp_streams; rtx++) {
int len = strlen(rt->rtsp_streams[rtx]->control_url);
if (len >= 4 &&
!strcmp(rt->rtsp_streams[rtx]->control_url + len - 4, "/rtx"))
!strcmp(rt->rtsp_streams[rtx]->control_url + len - 4,
"/rtx"))
break;
}
if (rtx == rt->nb_rtsp_streams)
@ -1006,20 +1025,22 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
/* first try in specified port range */
if (RTSP_RTP_PORT_MIN != 0) {
while (j <= RTSP_RTP_PORT_MAX) {
snprintf(buf, sizeof(buf), "rtp://%s?localport=%d", host, j);
j += 2; /* we will use two port by rtp stream (rtp and rtcp) */
if (url_open(&rtsp_st->rtp_handle, buf, URL_RDWR) == 0) {
snprintf(buf, sizeof(buf), "rtp://%s?localport=%d",
host, j);
/* we will use two ports per rtp stream (rtp and rtcp) */
j += 2;
if (url_open(&rtsp_st->rtp_handle, buf, URL_RDWR) == 0)
goto rtp_opened;
}
}
}
/* then try on any port
** if (url_open(&rtsp_st->rtp_handle, "rtp://", URL_RDONLY) < 0) {
** err = AVERROR_INVALIDDATA;
** goto fail;
** }
*/
#if 0
/* then try on any port */
if (url_open(&rtsp_st->rtp_handle, "rtp://", URL_RDONLY) < 0) {
err = AVERROR_INVALIDDATA;
goto fail;
}
#endif
rtp_opened:
port = rtp_get_local_port(rtsp_st->rtp_handle);
@ -1041,7 +1062,8 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
* UDP. When trying to set it up for TCP streams, the server
* will return an error. Therefore, we skip those streams. */
if (rt->server_type == RTSP_SERVER_WMS &&
s->streams[rtsp_st->stream_index]->codec->codec_type == CODEC_TYPE_DATA)
s->streams[rtsp_st->stream_index]->codec->codec_type ==
CODEC_TYPE_DATA)
continue;
snprintf(transport, sizeof(transport) - 1,
"%s/TCP;", trans_pref);
@ -1108,8 +1130,7 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
rtsp_st->interleaved_max = reply->transports[0].interleaved_max;
break;
case RTSP_LOWER_TRANSPORT_UDP:
{
case RTSP_LOWER_TRANSPORT_UDP: {
char url[1024];
/* XXX: also use address if specified */
@ -1120,10 +1141,9 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
err = AVERROR_INVALIDDATA;
goto fail;
}
}
break;
case RTSP_LOWER_TRANSPORT_UDP_MULTICAST:
{
}
case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: {
char url[1024];
struct in_addr in;
int port, ttl;
@ -1143,9 +1163,9 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
err = AVERROR_INVALIDDATA;
goto fail;
}
}
break;
}
}
if ((err = rtsp_open_transport_ctx(s, rtsp_st)))
goto fail;
@ -1239,13 +1259,13 @@ static int rtsp_read_header(AVFormatContext *s,
*option_list = 0;
/* handle the options */
if (strcmp(option, "udp") == 0)
if (!strcmp(option, "udp")) {
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP);
else if (strcmp(option, "multicast") == 0)
} else if (!strcmp(option, "multicast")) {
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP_MULTICAST);
else if (strcmp(option, "tcp") == 0)
} else if (!strcmp(option, "tcp")) {
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_TCP);
else {
} else {
strcpy(++filename, option);
filename += strlen(option);
if (option_list) *filename = '&';
@ -1266,7 +1286,8 @@ static int rtsp_read_header(AVFormatContext *s,
rt->rtsp_hd = rtsp_hd;
rt->seq = 0;
/* request options supported by the server; this also detects server type */
/* request options supported by the server; this also detects server
* type */
for (rt->server_type = RTSP_SERVER_RTP;;) {
snprintf(cmd, sizeof(cmd),
"OPTIONS %s RTSP/1.0\r\n", s->filename);
@ -1298,9 +1319,8 @@ static int rtsp_read_header(AVFormatContext *s,
continue;
} else if (!strncasecmp(reply->server, "WMServer/", 9)) {
rt->server_type = RTSP_SERVER_WMS;
} else if (rt->server_type == RTSP_SERVER_REAL) {
} else if (rt->server_type == RTSP_SERVER_REAL)
strcpy(real_challenge, reply->real_challenge);
}
break;
}
@ -1337,7 +1357,8 @@ static int rtsp_read_header(AVFormatContext *s,
}
do {
int lower_transport = ff_log2_tab[lower_transport_mask & ~(lower_transport_mask - 1)];
int lower_transport = ff_log2_tab[lower_transport_mask &
~(lower_transport_mask - 1)];
err = make_setup_request(s, host, port, lower_transport,
rt->server_type == RTSP_SERVER_REAL ?
@ -1352,8 +1373,7 @@ static int rtsp_read_header(AVFormatContext *s,
} while (err);
rt->state = RTSP_STATE_IDLE;
rt->seek_timestamp = 0; /* default is to start stream at position
zero */
rt->seek_timestamp = 0; /* default is to start stream at position zero */
if (ap->initial_pause) {
/* do not start immediately */
} else {
@ -1502,19 +1522,18 @@ static int rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
/* get next frames from the same RTP packet */
if (rt->cur_transport_priv) {
if (rt->transport == RTSP_TRANSPORT_RDT)
if (rt->transport == RTSP_TRANSPORT_RDT) {
ret = ff_rdt_parse_packet(rt->cur_transport_priv, pkt, NULL, 0);
else
} else
ret = rtp_parse_packet(rt->cur_transport_priv, pkt, NULL, 0);
if (ret == 0) {
rt->cur_transport_priv = NULL;
return 0;
} else if (ret == 1) {
return 0;
} else {
} else
rt->cur_transport_priv = NULL;
}
}
/* read next RTP packet */
redo:
@ -1536,22 +1555,20 @@ static int rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
return len;
if (len == 0)
return AVERROR_EOF;
if (rt->transport == RTSP_TRANSPORT_RDT)
if (rt->transport == RTSP_TRANSPORT_RDT) {
ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, buf, len);
else
} else
ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, buf, len);
if (ret < 0)
goto redo;
if (ret == 1) {
if (ret == 1)
/* more packets may follow, so we save the RTP context */
rt->cur_transport_priv = rtsp_st->transport_priv;
}
return ret;
}
static int rtsp_read_packet(AVFormatContext *s,
AVPacket *pkt)
static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt)
{
RTSPState *rt = s->priv_data;
int ret;
@ -1619,9 +1636,8 @@ static int rtsp_read_packet(AVFormatContext *s,
}
ret = rtsp_fetch_packet(s, pkt);
if (ret < 0) {
if (ret < 0)
return ret;
}
/* send dummy request to keep TCP connection alive */
if ((rt->server_type == RTSP_SERVER_WMS ||
@ -1670,7 +1686,9 @@ static int rtsp_read_seek(AVFormatContext *s, int stream_index,
{
RTSPState *rt = s->priv_data;
rt->seek_timestamp = av_rescale_q(timestamp, s->streams[stream_index]->time_base, AV_TIME_BASE_Q);
rt->seek_timestamp = av_rescale_q(timestamp,
s->streams[stream_index]->time_base,
AV_TIME_BASE_Q);
switch(rt->state) {
default:
case RTSP_STATE_IDLE:
@ -1732,7 +1750,8 @@ static int sdp_probe(AVProbeData *p1)
/* we look for a line beginning "c=IN IP4" */
while (p < p_end && *p != '\0') {
if (p + sizeof("c=IN IP4") - 1 < p_end && av_strstart(p, "c=IN IP4", NULL))
if (p + sizeof("c=IN IP4") - 1 < p_end &&
av_strstart(p, "c=IN IP4", NULL))
return AVPROBE_SCORE_MAX / 2;
while (p < p_end - 1 && *p != '\n') p++;
@ -1746,8 +1765,7 @@ static int sdp_probe(AVProbeData *p1)
#define SDP_MAX_SIZE 8192
static int sdp_read_header(AVFormatContext *s,
AVFormatParameters *ap)
static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
RTSPState *rt = s->priv_data;
RTSPStream *rtsp_st;