diff options
author | Tristan Matthews <tmatth@videolan.org> | 2017-11-29 14:16:02 -0500 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2017-11-30 15:32:04 +0100 |
commit | f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5 (patch) | |
tree | e55c5f2188a514631390b2962552ba2abba079b7 /libavformat/rtsp.c | |
parent | 99e9697e3a12ab4a6638a36b95edafd6a98f9eaa (diff) | |
download | ffmpeg-f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5.tar.gz |
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>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 17a25a310e..8bf9d9e3c7 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -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) { |