[FFmpeg-cvslog] r26189 - in trunk/libavformat: rtsp.c rtsp.h rtspdec.c rtspenc.c
mstorsjo
subversion
Sun Jan 2 11:06:22 CET 2011
Author: mstorsjo
Date: Sun Jan 2 11:06:21 2011
New Revision: 26189
Log:
rtsp: Add a method parameter to ff_rtsp_read_reply
Modified:
trunk/libavformat/rtsp.c
trunk/libavformat/rtsp.h
trunk/libavformat/rtspdec.c
trunk/libavformat/rtspenc.c
Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c Sun Jan 2 06:01:46 2011 (r26188)
+++ trunk/libavformat/rtsp.c Sun Jan 2 11:06:21 2011 (r26189)
@@ -758,7 +758,7 @@ void ff_rtsp_skip_packet(AVFormatContext
int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char **content_ptr,
- int return_on_interleaved_data)
+ int return_on_interleaved_data, const char *method)
{
RTSPState *rt = s->priv_data;
char buf[4096], buf1[1024], *q;
@@ -936,7 +936,7 @@ retry:
send_content_length)))
return ret;
- if ((ret = ff_rtsp_read_reply(s, reply, content_ptr, 0) ) < 0)
+ if ((ret = ff_rtsp_read_reply(s, reply, content_ptr, 0, method) ) < 0)
return ret;
if (reply->status_code == 401 && cur_auth_type == HTTP_AUTH_NONE &&
@@ -1512,7 +1512,7 @@ static int udp_read_packet(AVFormatConte
if (tcp_fd != -1 && FD_ISSET(tcp_fd, &rfds)) {
RTSPMessageHeader reply;
- ret = ff_rtsp_read_reply(s, &reply, NULL, 0);
+ ret = ff_rtsp_read_reply(s, &reply, NULL, 0, NULL);
if (ret < 0)
return ret;
/* XXX: parse message */
Modified: trunk/libavformat/rtsp.h
==============================================================================
--- trunk/libavformat/rtsp.h Sun Jan 2 06:01:46 2011 (r26188)
+++ trunk/libavformat/rtsp.h Sun Jan 2 11:06:21 2011 (r26189)
@@ -434,13 +434,15 @@ int ff_rtsp_send_cmd(AVFormatContext *s,
* data packets (if they are encountered), until a reply
* has been fully parsed. If no more data is available
* without parsing a reply, it will return an error.
+ * @param method the RTSP method this is a reply to. This affects how
+ * some response headers are acted upon. May be NULL.
*
* @return 1 if a data packets is ready to be received, -1 on error,
* and 0 on success.
*/
int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char **content_ptr,
- int return_on_interleaved_data);
+ int return_on_interleaved_data, const char *method);
/**
* Skip a RTP/TCP interleaved packet.
Modified: trunk/libavformat/rtspdec.c
==============================================================================
--- trunk/libavformat/rtspdec.c Sun Jan 2 06:01:46 2011 (r26188)
+++ trunk/libavformat/rtspdec.c Sun Jan 2 11:06:21 2011 (r26189)
@@ -170,7 +170,7 @@ redo:
for (;;) {
RTSPMessageHeader reply;
- ret = ff_rtsp_read_reply(s, &reply, NULL, 1);
+ ret = ff_rtsp_read_reply(s, &reply, NULL, 1, NULL);
if (ret < 0)
return ret;
if (ret == 1) /* received '$' */
Modified: trunk/libavformat/rtspenc.c
==============================================================================
--- trunk/libavformat/rtspenc.c Sun Jan 2 06:01:46 2011 (r26188)
+++ trunk/libavformat/rtspenc.c Sun Jan 2 11:06:21 2011 (r26189)
@@ -195,7 +195,7 @@ static int rtsp_write_packet(AVFormatCon
* since it would block and wait for an RTSP reply on the socket
* (which may not be coming any time soon) if it handles
* interleaved packets internally. */
- ret = ff_rtsp_read_reply(s, &reply, NULL, 1);
+ ret = ff_rtsp_read_reply(s, &reply, NULL, 1, NULL);
if (ret < 0)
return AVERROR(EPIPE);
if (ret == 1)
More information about the ffmpeg-cvslog
mailing list