diff options
author | Martin Storsjö <martin@martin.st> | 2010-10-01 17:43:27 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-10-01 17:43:27 +0000 |
commit | ad4ad27fb6d352a874d97d42ba95ae0b5cbfa860 (patch) | |
tree | 3be53d41d26d0108c40ad39afc9425916139435b /libavformat/rtpdec.c | |
parent | 96a7c9753e81ac1f2de12f3249ea7c001d50a3f7 (diff) | |
download | ffmpeg-ad4ad27fb6d352a874d97d42ba95ae0b5cbfa860.tar.gz |
rtsp/rtpdec: Allow rtp_parse_packet to take ownership of the packet buffer
Do the same change for ff_rdt_parse_packet, too, to keep the interfaces
similar.
Originally committed as revision 25289 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r-- | libavformat/rtpdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 942b8d71c8..65fa064682 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -414,14 +414,15 @@ static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestam * Parse an RTP or RTCP packet directly sent as a buffer. * @param s RTP parse context. * @param pkt returned packet - * @param buf input buffer or NULL to read the next packets + * @param bufptr pointer to the input buffer or NULL to read the next packets * @param len buffer len * @return 0 if a packet is returned, 1 if a packet is returned and more can follow * (use buf as NULL to read the next). -1 if no packet (error or no more packet). */ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, - const uint8_t *buf, int len) + uint8_t **bufptr, int len) { + uint8_t* buf = bufptr ? *bufptr : NULL; unsigned int ssrc, h; int payload_type, seq, ret, flags = 0; AVStream *st; |