mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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>
This commit is contained in:
parent
b4103e0eb6
commit
0d156eb58a
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user