Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
| ... | ... |
@@ -342,8 +342,9 @@ static int gxf_write_map_packet(AVFormatContext *s, int rewrite) |
| 342 | 342 |
|
| 343 | 343 |
if (!rewrite) {
|
| 344 | 344 |
if (!(gxf->map_offsets_nb % 30)) {
|
| 345 |
- gxf->map_offsets = av_realloc(gxf->map_offsets, |
|
| 346 |
- (gxf->map_offsets_nb+30)*sizeof(*gxf->map_offsets)); |
|
| 345 |
+ gxf->map_offsets = av_realloc_f(gxf->map_offsets, |
|
| 346 |
+ sizeof(*gxf->map_offsets), |
|
| 347 |
+ gxf->map_offsets_nb+30); |
|
| 347 | 348 |
if (!gxf->map_offsets) {
|
| 348 | 349 |
av_log(s, AV_LOG_ERROR, "could not realloc map offsets\n"); |
| 349 | 350 |
return -1; |
| ... | ... |
@@ -889,8 +890,9 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt) |
| 889 | 889 |
|
| 890 | 890 |
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
|
| 891 | 891 |
if (!(gxf->flt_entries_nb % 500)) {
|
| 892 |
- gxf->flt_entries = av_realloc(gxf->flt_entries, |
|
| 893 |
- (gxf->flt_entries_nb+500)*sizeof(*gxf->flt_entries)); |
|
| 892 |
+ gxf->flt_entries = av_realloc_f(gxf->flt_entries, |
|
| 893 |
+ sizeof(*gxf->flt_entries), |
|
| 894 |
+ gxf->flt_entries_nb+500); |
|
| 894 | 895 |
if (!gxf->flt_entries) {
|
| 895 | 896 |
av_log(s, AV_LOG_ERROR, "could not reallocate flt entries\n"); |
| 896 | 897 |
return -1; |