aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2020-09-26 18:26:30 -0400
committerAndriy Gelman <andriy.gelman@gmail.com>2020-10-08 23:18:18 -0400
commit0d156eb58a2bfb136c6481611fad7505b3a2c0c1 (patch)
treea7f079db095ddd1e74767d68909fedd9168a1b6b /libavformat
parentb4103e0eb6abd1f289042ce796f4488725fcd156 (diff)
downloadffmpeg-0d156eb58a2bfb136c6481611fad7505b3a2c0c1.tar.gz
avformat/rtsp: allocate correct max number of pollfds
There is one general rtsp connection plus two connections per stream (rtp/rtcp). Reviewed-by: Zhao Zhili <zhilizhao@tencent.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 2ce09477ed..e9fca034b4 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1990,7 +1990,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
int *fds = NULL, fdsnum, fdsidx;
if (!p) {
- p = rt->p = av_malloc_array(2 * (rt->nb_rtsp_streams + 1), sizeof(struct pollfd));
+ p = rt->p = av_malloc_array(2 * rt->nb_rtsp_streams + 1, sizeof(struct pollfd));
if (!p)
return AVERROR(ENOMEM);