Commit ca384d70 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rtsp: use av_malloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 418e5768
...@@ -658,7 +658,7 @@ int ff_sdp_parse(AVFormatContext *s, const char *content) ...@@ -658,7 +658,7 @@ int ff_sdp_parse(AVFormatContext *s, const char *content)
av_free(s1->default_exclude_source_addrs[i]); av_free(s1->default_exclude_source_addrs[i]);
av_freep(&s1->default_exclude_source_addrs); 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); if (!rt->p) return AVERROR(ENOMEM);
return 0; return 0;
} }
......
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