[FFmpeg-cvslog] avformat/rtsp: allocate correct max number of pollfds
Andriy Gelman
git at videolan.org
Fri Oct 9 06:19:16 EEST 2020
ffmpeg | branch: master | Andriy Gelman <andriy.gelman at gmail.com> | Sat Sep 26 18:26:30 2020 -0400| [0d156eb58a2bfb136c6481611fad7505b3a2c0c1] | committer: Andriy Gelman
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 at tencent.com>
Signed-off-by: Andriy Gelman <andriy.gelman at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d156eb58a2bfb136c6481611fad7505b3a2c0c1
---
libavformat/rtsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list