diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-19 19:44:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-19 19:44:56 +0200 |
commit | a7bb22c5aaba81b2672456a0802e41773fed8aa0 (patch) | |
tree | 23df9e5b5a182e292c1c1791e37815e57f0d18e9 /libavformat | |
parent | d9ddbaa9245c3cac92d99f7e8ff762518e8ef39e (diff) | |
download | ffmpeg-a7bb22c5aaba81b2672456a0802e41773fed8aa0.tar.gz |
avformat/seek: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/seek.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/seek.c b/libavformat/seek.c index bb5ca87cfa..2368b5e5b9 100644 --- a/libavformat/seek.c +++ b/libavformat/seek.c @@ -280,7 +280,7 @@ int64_t ff_gen_syncpoint_search(AVFormatContext *s, } // Initialize syncpoint structures for each stream. - sync = av_malloc(s->nb_streams * sizeof(AVSyncPoint)); + sync = av_malloc_array(s->nb_streams, sizeof(AVSyncPoint)); if (!sync) // cannot allocate helper structure return -1; @@ -402,7 +402,7 @@ AVParserState *ff_store_parser_state(AVFormatContext *s) if (!state) return NULL; - state->stream_states = av_malloc(sizeof(AVParserStreamState) * s->nb_streams); + state->stream_states = av_malloc_array(s->nb_streams, sizeof(AVParserStreamState)); if (!state->stream_states) { av_free(state); return NULL; |