summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2008-10-01 12:37:07 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2008-10-01 12:37:07 +0000
commit985b05d3c91c9edbf9501307878daa4eba223e1d (patch)
tree5fdba3d9f659f853beb0140bdae41f23bb35f156 /libavformat/rtsp.c
parent5fbec7919743cbe4509d6967b287d3e663b13e16 (diff)
This patch refactors RDT packet header parsing so that it can be used in
rtsp.c to detect the ID of the packet source also in case of TCP streams. This allows proper playback of RDT streams with multiple stream types, e.g. audio + video. Accepted by LucaB in "RDT/Realmedia patches #2" thread on ML. Originally committed as revision 15496 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index b6013de267..254931cf3d 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1265,6 +1265,9 @@ static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
ret = url_readbuf(rt->rtsp_hd, buf, len);
if (ret != len)
return -1;
+ if (rt->transport == RTSP_TRANSPORT_RDT &&
+ ff_rdt_parse_header(buf, len, &id, NULL, NULL, NULL) < 0)
+ return -1;
/* find the matching stream */
for(i = 0; i < rt->nb_rtsp_streams; i++) {