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
This commit is contained in:
Martin Storsjö
2010-10-01 17:43:27 +00:00
parent 96a7c9753e
commit ad4ad27fb6
5 changed files with 9 additions and 7 deletions

View File

@@ -1843,9 +1843,9 @@ static int rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
if (len == 0)
return AVERROR_EOF;
if (rt->transport == RTSP_TRANSPORT_RDT) {
ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, rt->recvbuf, len);
ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len);
} else {
ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, rt->recvbuf, len);
ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len);
if (ret < 0) {
/* Either bad packet, or a RTCP packet. Check if the
* first_rtcp_ntp_time field was initialized. */