summaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_qt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-19 11:01:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-19 11:01:26 +0200
commit20dfab33f5ab61fc51de65192ed239f8b62782a2 (patch)
treef5164b3f79ab48e4dd4c027bef968666f7748716 /libavformat/rtpdec_qt.c
parentf54d751f33375054d4ecf30301ef008c8e781f99 (diff)
parent5626f994f273af80fb100d4743b963304de9e05c (diff)
downloadffmpeg-streaming-20dfab33f5ab61fc51de65192ed239f8b62782a2.zip
ffmpeg-streaming-20dfab33f5ab61fc51de65192ed239f8b62782a2.tar.gz
Merge commit '5626f994f273af80fb100d4743b963304de9e05c'
* commit '5626f994f273af80fb100d4743b963304de9e05c': avformat: Use av_reallocp() where suitable Conflicts: libavformat/avidec.c libavformat/avienc.c libavformat/aviobuf.c libavformat/oggparsevorbis.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_qt.c')
-rw-r--r--libavformat/rtpdec_qt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 8e887a5..565f2c2 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -172,8 +172,10 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
switch (packing_scheme) {
case 3: /* one data packet spread over 1 or multiple RTP packets */
if (qt->pkt.size > 0 && qt->timestamp == *timestamp) {
- qt->pkt.data = av_realloc(qt->pkt.data, qt->pkt.size + alen +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ int err;
+ if ((err = av_reallocp(&qt->pkt.data, qt->pkt.size + alen +
+ FF_INPUT_BUFFER_PADDING_SIZE)) < 0)
+ return err;
} else {
av_freep(&qt->pkt.data);
av_init_packet(&qt->pkt);
@@ -181,8 +183,6 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
qt->pkt.size = 0;
qt->timestamp = *timestamp;
}
- if (!qt->pkt.data)
- return AVERROR(ENOMEM);
memcpy(qt->pkt.data + qt->pkt.size, buf + avio_tell(&pb), alen);
qt->pkt.size += alen;
if (has_marker_bit) {
OpenPOWER on IntegriCloud