Browse Source

avformat/rtspdec: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
5be8c27694
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/rtspdec.c

+ 1
- 1
libavformat/rtspdec.c View File

@@ -696,7 +696,7 @@ static int rtsp_read_header(AVFormatContext *s)
return ret;

rt->real_setup_cache = !s->nb_streams ? NULL :
av_mallocz(2 * s->nb_streams * sizeof(*rt->real_setup_cache));
av_mallocz_array(s->nb_streams, 2 * sizeof(*rt->real_setup_cache));
if (!rt->real_setup_cache && s->nb_streams)
return AVERROR(ENOMEM);
rt->real_setup = rt->real_setup_cache + s->nb_streams;


Loading…
Cancel
Save