summaryrefslogtreecommitdiff
path: root/libavformat/rdt.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2008-10-04 04:15:06 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2008-10-04 04:15:06 +0000
commit9b932b8ac0c63cf52642dbe4e3953a312e6cf900 (patch)
tree67591ba263b0fb8d56ffc32a6dd4257df0c266fc /libavformat/rdt.c
parented0aacc76eccf2b523352f0c74107e2f6ba9cf93 (diff)
Change function prototype of RTPDynamicPayloadHandler.parse_packet() to
not use RTPDemuxContext, but rather take a pointer to the payload context directly. This allows using payload handlers regardless over the transport over which they were sent, and prepares for the introduction of a future RDTDemuxContext. See discussion in "RDT/Realmedia patches #2" thread on ML. Originally committed as revision 15541 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rdt.c')
-rw-r--r--libavformat/rdt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index 1fa36df04d..cce8a8bf8a 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -163,14 +163,13 @@ ff_rdt_parse_header(const uint8_t *buf, int len,
/**< return 0 on packet, no more left, 1 on packet, 1 on partial packet... */
static int
-rdt_parse_packet (RTPDemuxContext *s, AVPacket *pkt, uint32_t *timestamp,
+rdt_parse_packet (PayloadContext *rdt, AVStream *st,
+ AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, int flags)
{
- PayloadContext *rdt = s->dynamic_protocol_context;
int seq = 1, res;
ByteIOContext *pb = rdt->rmctx->pb;
RMContext *rm = rdt->rmctx->priv_data;
- AVStream *st = s->st;
if (rm->audio_pkt_cnt == 0) {
int pos;
@@ -217,7 +216,8 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
if (!buf) {
/* return the next packets, if any */
timestamp= 0; ///< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
- rv= s->parse_packet(s, pkt, &timestamp, NULL, 0, flags);
+ rv= s->parse_packet(s->dynamic_protocol_context,
+ s->st, pkt, &timestamp, NULL, 0, flags);
return rv;
}
@@ -235,7 +235,8 @@ ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
len -= rv;
s->seq = seq;
- rv = s->parse_packet(s, pkt, &timestamp, buf, len, flags);
+ rv = s->parse_packet(s->dynamic_protocol_context,
+ s->st, pkt, &timestamp, buf, len, flags);
return rv;
}