On Mon, 12 Oct 2020, Andriy Gelman wrote:

From: Andriy Gelman <andriy.gel...@gmail.com>

In this error path ret still stores the number of bytes read in
ffurl_read().

Signed-off-by: Andriy Gelman <andriy.gel...@gmail.com>
---
libavformat/rtsp.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index e9fca034b4..cb9fc31166 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -2503,6 +2503,7 @@ static int rtp_read_header(AVFormatContext *s)
        av_log(s, AV_LOG_ERROR, "Unable to receive RTP payload type %d "
                                "without an SDP file describing it\n",
                                 payload_type);
+        ret = AVERROR_INVALIDDATA;
        goto fail;
    }
    if (par->codec_type != AVMEDIA_TYPE_DATA) {
--
2.28.0

Oops, it looks like this was missing from the initial patch of this function, so LGTM, thanks!

// Martin

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to