Commit af84d9bb authored by Nicolas George's avatar Nicolas George Committed by Michael Niedermayer

gxfenc: Replace av_realloc by av_realloc_f when relevant.

Signed-off-by: 's avatarNicolas George <nicolas.george@normalesup.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 247a1dc8
...@@ -342,8 +342,9 @@ static int gxf_write_map_packet(AVFormatContext *s, int rewrite) ...@@ -342,8 +342,9 @@ static int gxf_write_map_packet(AVFormatContext *s, int rewrite)
if (!rewrite) { if (!rewrite) {
if (!(gxf->map_offsets_nb % 30)) { if (!(gxf->map_offsets_nb % 30)) {
gxf->map_offsets = av_realloc(gxf->map_offsets, gxf->map_offsets = av_realloc_f(gxf->map_offsets,
(gxf->map_offsets_nb+30)*sizeof(*gxf->map_offsets)); sizeof(*gxf->map_offsets),
gxf->map_offsets_nb+30);
if (!gxf->map_offsets) { if (!gxf->map_offsets) {
av_log(s, AV_LOG_ERROR, "could not realloc map offsets\n"); av_log(s, AV_LOG_ERROR, "could not realloc map offsets\n");
return -1; return -1;
...@@ -889,8 +890,9 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -889,8 +890,9 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
if (!(gxf->flt_entries_nb % 500)) { if (!(gxf->flt_entries_nb % 500)) {
gxf->flt_entries = av_realloc(gxf->flt_entries, gxf->flt_entries = av_realloc_f(gxf->flt_entries,
(gxf->flt_entries_nb+500)*sizeof(*gxf->flt_entries)); sizeof(*gxf->flt_entries),
gxf->flt_entries_nb+500);
if (!gxf->flt_entries) { if (!gxf->flt_entries) {
av_log(s, AV_LOG_ERROR, "could not reallocate flt entries\n"); av_log(s, AV_LOG_ERROR, "could not reallocate flt entries\n");
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment