diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2008-09-30 13:23:33 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2008-09-30 13:23:33 +0000 |
commit | ab63fb0360f1f5ce5cd7199786940d56c7a10632 (patch) | |
tree | be1d9bdc2fe83f1ddd9dad4386ca7ed857242b3a /libavformat/rdt.c | |
parent | eee2cbff77d957e19c8e7d4407a27a5f42fef5f6 (diff) | |
download | ffmpeg-ab63fb0360f1f5ce5cd7199786940d56c7a10632.tar.gz |
Remove access to rdt_data struct in functions called outside of the
DynamicProtocol* context. Doing so could lead to problems if we're accessing
Real servers serving non-RDT data (or the other way around). Temporarily,
this patch adds a _subscribe2() function which will soon be removed in one
of the subsequent commits. OK'ed by Luca in "Realmedia patch" thread on ML.
Originally committed as revision 15483 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rdt.c')
-rw-r--r-- | libavformat/rdt.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c index 2007566b3a..c1238b2d46 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -234,15 +234,20 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt, } void -ff_rdt_subscribe_rule (RTPDemuxContext *s, char *cmd, int size, +ff_rdt_subscribe_rule (char *cmd, int size, int stream_nr, int rule_nr) { - rdt_data *rdt = s->dynamic_protocol_context; - av_strlcatf(cmd, size, "stream=%d;rule=%d,stream=%d;rule=%d", - stream_nr, rule_nr, stream_nr, rule_nr + 1); + stream_nr, rule_nr * 2, stream_nr, rule_nr * 2 + 1); +} + +void +ff_rdt_subscribe_rule2 (RTPDemuxContext *s, char *cmd, int size, + int stream_nr, int rule_nr) +{ + rdt_data *rdt = s->dynamic_protocol_context; - rdt_load_mdpr(rdt, s->st, 0); + rdt_load_mdpr(rdt, s->st, rule_nr * 2); } static unsigned char * |