From patchwork Mon Apr 15 08:15:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lance.Gao" X-Patchwork-Id: 12750 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 0B974446C12 for ; Mon, 15 Apr 2019 11:47:19 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E155668A808; Mon, 15 Apr 2019 11:47:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from m50-111.126.com (m50-111.126.com [123.125.50.111]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 678A768A74E for ; Mon, 15 Apr 2019 11:47:11 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=Z9rE+cuDxXOuopviDl KFtCX4QL4osOxJZPBm0r4OcYM=; b=hoacBjcKrYIXLpaxB8RppE2PY6fIR/fcsx wyEkdhYl9SNJViyuEVKOykNbV7bNoXJgdD5a5jHwS/DltlrkFAxOSwJtT69q4DmX 65HyEGC1lLorgHIZTbZs1q7SOqmrmBBDFtxDEDLx6U75I4J9yJMfeZ9/nFWdIVaJ skW9taHVo= Received: from localhost.localdomain (unknown [61.135.169.82]) by smtp5 (Coremail) with SMTP id jtKowAB3l1_PPbRcVksnAA--.204S3; Mon, 15 Apr 2019 16:16:35 +0800 (CST) From: "Lance.Gao" To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Apr 2019 16:15:50 +0800 Message-Id: <1555316150-7192-1-git-send-email-bweaglegao@126.com> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: jtKowAB3l1_PPbRcVksnAA--.204S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU2veHUUUUU X-Originating-IP: [61.135.169.82] X-CM-SenderInfo: 5ezhtw5ohjt0a6rslhhfrp/1tbiXwSXUVpD7y8y6gAAsc Subject: [FFmpeg-devel] [PATCH v1] avformat/flvdec: fix the problem of packet mismatch while reading rtmp stream 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Lance.Gao --- libavformat/flvdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index b531a39..bc63dd2 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1003,6 +1003,8 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) int orig_size; retry: + if (avio_feof(s->pb)) + return AVERROR_EOF; /* pkt size is repeated at end. skip it */ pos = avio_tell(s->pb); type = (avio_r8(s->pb) & 0x1F);