aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-11 13:34:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-11 13:36:11 +0200
commit9bca8e534150cd0d2d6bc8dc5c142c6ea2de6699 (patch)
treea32c177c7df35ce5d8712af3467de44ede6fca90
parente5290823697d93f96cde6d59b3d66b1354696dee (diff)
downloadffmpeg-9bca8e534150cd0d2d6bc8dc5c142c6ea2de6699.tar.gz
avformat/matroskaenc: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/matroskaenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 7ccabb97f4..795e47b77e 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -307,7 +307,7 @@ static int mkv_add_seekhead_entry(mkv_seekhead *seekhead, unsigned int elementid
if (seekhead->max_entries > 0 && seekhead->max_entries <= seekhead->num_entries)
return -1;
- entries = av_realloc(entries, (seekhead->num_entries + 1) * sizeof(mkv_seekhead_entry));
+ entries = av_realloc_array(entries, seekhead->num_entries + 1, sizeof(mkv_seekhead_entry));
if (entries == NULL)
return AVERROR(ENOMEM);
@@ -388,7 +388,7 @@ static int mkv_add_cuepoint(mkv_cues *cues, int stream, int64_t ts, int64_t clus
if (ts < 0)
return 0;
- entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
+ entries = av_realloc_array(entries, cues->num_entries + 1, sizeof(mkv_cuepoint));
if (entries == NULL)
return AVERROR(ENOMEM);