Mercurial > libavformat.hg
diff rdt.c @ 3959:ed6f6aa977ec libavformat
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.
author | rbultje |
---|---|
date | Tue, 30 Sep 2008 13:23:33 +0000 |
parents | 91987686113d |
children | 72efef66f566 |
line wrap: on
line diff
--- a/rdt.c Tue Sep 30 13:20:23 2008 +0000 +++ b/rdt.c Tue Sep 30 13:23:33 2008 +0000 @@ -234,15 +234,20 @@ } 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) { + av_strlcatf(cmd, size, "stream=%d;rule=%d,stream=%d;rule=%d", + 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; - av_strlcatf(cmd, size, "stream=%d;rule=%d,stream=%d;rule=%d", - stream_nr, rule_nr, stream_nr, rule_nr + 1); - - rdt_load_mdpr(rdt, s->st, 0); + rdt_load_mdpr(rdt, s->st, rule_nr * 2); } static unsigned char *