1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

rtsp: only break on parse_rtsp_message on error

Fix suggested by Luca Barbato.

This was causing spurious EOFs when using -rtsp_transport udp, as
reported in https://bugzilla.libav.org/show_bug.cgi?id=1103

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Tristan Matthews 2017-11-29 14:16:02 -05:00 committed by Luca Barbato
parent 99e9697e3a
commit f6161fccf8

View File

@ -1998,7 +1998,9 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
}
#if CONFIG_RTSP_DEMUXER
if (rt->rtsp_hd && p[0].revents & POLLIN) {
return parse_rtsp_message(s);
if ((ret = parse_rtsp_message(s)) < 0) {
return ret;
}
}
#endif
} else if (n == 0 && ++timeout_cnt >= MAX_TIMEOUTS) {