diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-27 11:45:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-27 11:45:37 +0200 |
commit | 328a5b93d3a493d6a653a83c425fb2cc98e8f41b (patch) | |
tree | e0421444cf63d304857fb0693fd592e22b670e9b /libavformat/rtpdec_qt.c | |
parent | 47c5c942f823ed3f9e9bde95e5f05cf55918ab04 (diff) | |
parent | 06ebc0bf9a6401733a4ce1310325de19f631819a (diff) | |
download | ffmpeg-328a5b93d3a493d6a653a83c425fb2cc98e8f41b.tar.gz |
Merge commit '06ebc0bf9a6401733a4ce1310325de19f631819a'
* commit '06ebc0bf9a6401733a4ce1310325de19f631819a':
lavf: Allocate arrays with av_realloc if they will be realloced later
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_qt.c')
-rw-r--r-- | libavformat/rtpdec_qt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c index a7bf544b8f..2028c3cfe8 100644 --- a/libavformat/rtpdec_qt.c +++ b/libavformat/rtpdec_qt.c @@ -179,7 +179,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, } else { av_freep(&qt->pkt.data); av_init_packet(&qt->pkt); - qt->pkt.data = av_malloc(alen + FF_INPUT_BUFFER_PADDING_SIZE); + qt->pkt.data = av_realloc(NULL, alen + FF_INPUT_BUFFER_PADDING_SIZE); if (!qt->pkt.data) return AVERROR(ENOMEM); qt->pkt.size = 0; @@ -213,7 +213,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, pkt->stream_index = st->index; if (qt->remaining > 0) { av_freep(&qt->pkt.data); - qt->pkt.data = av_malloc(qt->remaining * qt->bytes_per_frame); + qt->pkt.data = av_realloc(NULL, qt->remaining * qt->bytes_per_frame); if (!qt->pkt.data) { av_free_packet(pkt); return AVERROR(ENOMEM); |