]> git.sesse.net Git - ffmpeg/commitdiff
avformat/rtsp: set return variable in error path
authorAndriy Gelman <andriy.gelman@gmail.com>
Mon, 12 Oct 2020 20:36:08 +0000 (16:36 -0400)
committerAndriy Gelman <andriy.gelman@gmail.com>
Sat, 21 Nov 2020 15:15:46 +0000 (10:15 -0500)
In this error path ret still stores the number of bytes read in
ffurl_read().

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
libavformat/rtsp.c

index d9832bbf1f2e123ac1f0081cb527426ff2f0a452..b0631c7abff0c9b08863075bba6e83528a91ca8f 100644 (file)
@@ -2493,6 +2493,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) {