diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 06bd8bf1ae..4af97c1822 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -248,6 +248,8 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size) } break; } + } else if (n < 0) { + return AVERROR(EIO); } } #endif