diff rtpdec.c @ 3976:64056a0c38ce libavformat

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.
author rbultje
date Sat, 04 Oct 2008 04:15:06 +0000
parents 874534fb6d0f
children 1f1c4535f421
line wrap: on
line diff
--- a/rtpdec.c	Sat Oct 04 04:11:12 2008 +0000
+++ b/rtpdec.c	Sat Oct 04 04:15:06 2008 +0000
@@ -399,7 +399,8 @@
         /* return the next packets, if any */
         if(s->st && s->parse_packet) {
             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);
             finalize_packet(s, pkt, timestamp);
             return rv;
         } else {
@@ -463,7 +464,8 @@
             return 1;
         }
     } else if (s->parse_packet) {
-        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);
     } else {
         // at this point, the RTP header has been stripped;  This is ASSUMING that there is only 1 CSRC, which in't wise.
         switch(st->codec->codec_id) {