From patchwork Wed Oct 14 14:34:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 22951 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 05A9644B680 for ; Wed, 14 Oct 2020 18:03:08 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E110F68BAE3; Wed, 14 Oct 2020 18:03:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 309D768B704 for ; Wed, 14 Oct 2020 18:03:01 +0300 (EEST) Received: by mail-oi1-f193.google.com with SMTP id m128so3529050oig.7 for ; Wed, 14 Oct 2020 08:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hd6qr6wQLajixR3SXXetnCG9ij4zXjXN8DSEDs3ND8c=; b=joCHREErTMeiGdYmKVFDfeVVLs8rICG6YjgFwDh8yAtXlmQY3mgPUWgnr5I4EphwrY KStPAHPxD53oTPnmnPBleA/sCtnYzLGxmK7yjTU5WHDRyFV2VMlukiiuafGpYf20n/rk qryeAd1EzZwx3gU9rKZf1tUiTDzhxEpyPT2RGSE8i+qZT6dxwXRMeEAXVMd6lfYpd99b pfdOxQaHZNeqBYFIyjJmE/a9/lnSVxntCPDe5FbhiosXpv8aImfybBehQWiqnErGcvrS /KiJMy6k9On2TpCiWIWyDcAvqMhJEXC7lHxJW8SLzWfpQ+bWfV/+F8OlfDucK6O3fHsJ eDxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hd6qr6wQLajixR3SXXetnCG9ij4zXjXN8DSEDs3ND8c=; b=itB6G5qL4+UvBE5iFv5yBVM1LPi/UWoZbfZuarN5whBD+ea4kJzsUJaQzNRYsFDkF1 A5oBlzaddJ2wIWl1+6PVGJUfVssAJb+Fq5XiOwIFeCQ60vvUatvRnpr+3vyrKG4xa9vK xt3uG+Z38hDPs5t2noazPBXpoZbDx0CwA5GQpShY21dp/RzKe+MoyOmVNc5iRWRr2cRv Ywra6I/QGt2GCUOfDvIDDK8IfQXYW5TAUuoAIgEArPnCzsd3tn6XvIoXx+L2OC9sXcBB FchklEtvdPx3ozCUAeP/ExNpqD5gJWmGqkE/bMYfbMnNwRXq9lASJ7clilku819Bmgy7 inQw== X-Gm-Message-State: AOAM531j3TB1f1rdF1AVZz7CPvWi7zWUQ24HE5o8fISZt+S9rsz4wwYf a1TokmmZVbT3ln5kmVBzzxptVo2M2Ac= X-Google-Smtp-Source: ABdhPJyKx8WSHYIB8RZwGn8XnRAc7YXMht39fKLsnQba0qLQlTXI3UsIpzLkdHSD/ICvEMRRDLGXwA== X-Received: by 2002:a17:90a:db91:: with SMTP id h17mr3802128pjv.94.1602686119847; Wed, 14 Oct 2020 07:35:19 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id o4sm3612035pjj.38.2020.10.14.07.35.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2020 07:35:18 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 14 Oct 2020 22:34:58 +0800 Message-Id: <1602686103-3427-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH 1/6] avformat/rtpdec: update the previous with new seq X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang If the rtp input is discontinued, we'll drop all the new received packets now, It's better to update the previous seq with the new seq so that the following packets will not be dropped always. Signed-off-by: Limin Wang --- libavformat/rtpdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 3d5b200..de79536 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -833,6 +833,7 @@ static int rtp_parse_one_packet(RTPDemuxContext *s, AVPacket *pkt, /* Packet older than the previously emitted one, drop */ av_log(s->ic, AV_LOG_WARNING, "RTP: dropping old packet received too late\n"); + s->seq = seq; return -1; } else if (diff <= 1) { /* Correct packet */