[FFmpeg-devel] [PATCH 3/6] avformat/rtsp: prefer to return EOF for incomplete read

lance.lmwang at gmail.com lance.lmwang at gmail.com
Sun Dec 5 16:26:33 EET 2021


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavformat/rtsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 5cffe0b..2ee2463 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1247,7 +1247,7 @@ start:
             return AVERROR(ENOMEM);
         if (ffurl_read_complete(rt->rtsp_hd, content, content_length) != content_length) {
             av_freep(&content);
-            return AVERROR(EIO);
+            return AVERROR_EOF;
         }
         content[content_length] = '\0';
     }
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list