Mercurial > libavformat.hg
diff rtpdec.c @ 2941:6da0564c9d02 libavformat
Add a flags field to the RTPDynamicPayloadPacketHandlerProc (PKT_FLAG_*).
This can be used later by RDT to get the flags from the RTP packet and
use that for the RealMedia packet (such as whether this RTP packet
represents a keyframe or not). For discussion, see "[PATCH] Realmedia
/ RTSP (RDT)".
author | rbultje |
---|---|
date | Fri, 18 Jan 2008 20:48:32 +0000 |
parents | 9e85e46922b5 |
children | 8891d470ada3 |
line wrap: on
line diff
--- a/rtpdec.c Thu Jan 17 20:48:07 2008 +0000 +++ b/rtpdec.c Fri Jan 18 20:48:32 2008 +0000 @@ -402,7 +402,7 @@ const uint8_t *buf, int len) { unsigned int ssrc, h; - int payload_type, seq, ret; + int payload_type, seq, ret, flags = 0; AVStream *st; uint32_t timestamp; int rv= 0; @@ -411,7 +411,7 @@ /* 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, ×tamp, NULL, 0); + rv= s->parse_packet(s, pkt, ×tamp, NULL, 0, flags); finalize_packet(s, pkt, timestamp); return rv; } else { @@ -475,7 +475,7 @@ return 1; } } else if (s->parse_packet) { - rv = s->parse_packet(s, pkt, ×tamp, buf, len); + rv = s->parse_packet(s, pkt, ×tamp, 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) {