1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

rtpdec: Check the return value from av_new_packet

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2013-01-20 18:31:57 +02:00
parent 04ea5491a8
commit a76bc3bc44

View File

@ -635,7 +635,8 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt,
} else if (st) {
/* At this point, the RTP header has been stripped;
* This is ASSUMING that there is only 1 CSRC, which isn't wise. */
av_new_packet(pkt, len);
if ((rv = av_new_packet(pkt, len)) < 0)
return rv;
memcpy(pkt->data, buf, len);
pkt->stream_index = st->index;
} else {