Browse Source

avformat/rtsp: use av_malloc_array()

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

+ 1
- 1
libavformat/rtsp.c View File

@@ -658,7 +658,7 @@ int ff_sdp_parse(AVFormatContext *s, const char *content)
av_free(s1->default_exclude_source_addrs[i]);
av_freep(&s1->default_exclude_source_addrs);

rt->p = av_malloc(sizeof(struct pollfd)*2*(rt->nb_rtsp_streams+1));
rt->p = av_malloc_array(rt->nb_rtsp_streams + 1, sizeof(struct pollfd) * 2);
if (!rt->p) return AVERROR(ENOMEM);
return 0;
}


Loading…
Cancel
Save