Commit f6161fcc authored by Tristan Matthews's avatar Tristan Matthews Committed by Luca Barbato

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=1103Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent 99e9697e
...@@ -1998,7 +1998,9 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, ...@@ -1998,7 +1998,9 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
} }
#if CONFIG_RTSP_DEMUXER #if CONFIG_RTSP_DEMUXER
if (rt->rtsp_hd && p[0].revents & POLLIN) { if (rt->rtsp_hd && p[0].revents & POLLIN) {
return parse_rtsp_message(s); if ((ret = parse_rtsp_message(s)) < 0) {
return ret;
}
} }
#endif #endif
} else if (n == 0 && ++timeout_cnt >= MAX_TIMEOUTS) { } else if (n == 0 && ++timeout_cnt >= MAX_TIMEOUTS) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment