diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-08-08 11:28:44 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-08-16 16:42:45 +0300 |
commit | 91dd605ab7326f5b7fa4fde27c6c5d1604d6e470 (patch) | |
tree | 96a704dfd76a9476b877f5c0c5c014de4c6857e9 | |
parent | 83c2fbf0385365764dad57929f0e0b488b6b84bf (diff) | |
download | gstreamer-plugins-bad-91dd605ab7326f5b7fa4fde27c6c5d1604d6e470.tar.gz |
amc: Fix call to realloc() to allocate the correct size of items
-rw-r--r-- | sys/androidmedia/gstamc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/androidmedia/gstamc.c b/sys/androidmedia/gstamc.c index 7f3bf8bdf..14f5e4cf4 100644 --- a/sys/androidmedia/gstamc.c +++ b/sys/androidmedia/gstamc.c @@ -1866,7 +1866,8 @@ scan_codecs (GstPlugin * plugin) tmp->gl_output_only |= gst_codec_info->gl_output_only; tmp->n_supported_types += gst_codec_info->n_supported_types; tmp->supported_types = - g_realloc (tmp->supported_types, tmp->n_supported_types); + g_realloc (tmp->supported_types, + tmp->n_supported_types * sizeof (GstAmcCodecType)); for (n = 0; n < gst_codec_info->n_supported_types; n++, m++) { tmp->supported_types[m] = gst_codec_info->supported_types[n]; |