mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
RTMP: fix FD leak in rtmp_open()
If we setup AVIO interrupt callback and it will be returns 1 on socket timeouts and we try to connect to non-existing streams on some servers (like nginx-rtmp) we got FD leak. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
61c0683080
commit
08ccc474b7
@ -2670,7 +2670,7 @@ reconnect:
|
|||||||
// audio or video packet arrives.
|
// audio or video packet arrives.
|
||||||
while (!rt->has_audio && !rt->has_video && !rt->received_metadata) {
|
while (!rt->has_audio && !rt->has_video && !rt->received_metadata) {
|
||||||
if ((ret = get_packet(s, 0)) < 0)
|
if ((ret = get_packet(s, 0)) < 0)
|
||||||
return ret;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Either after we have read the metadata or (if there is none) the
|
// Either after we have read the metadata or (if there is none) the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user