Message ID | 20170904032329.32670-1-lq@chinaffmpeg.org |
---|---|
State | New |
Headers | show
Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp2721736jao; Sun, 3 Sep 2017 20:25:26 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7zb+fAdullojistqSqI1kPAnZvwaMEFhqlP8V9uCY8/ho7lhnpsCQedQNpBh0fx4K+nB9+ X-Received: by 10.28.195.67 with SMTP id t64mr2820295wmf.41.1504495526828; Sun, 03 Sep 2017 20:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504495526; cv=none; d=google.com; s=arc-20160816; b=D/Zmb2VXu8H5tO600bEYIuZEHhYqt97GyGS31fon7UFO7KV8Me8hV17zZvzebp14OF bSOP3fFmgK6rs+RRSGBlL/1sZS62w9oMSXtQJ3ED8aMyboc7xFbHgLYYsNBhWppAhgzM eb1clxHLkZoruidzSNmtoaGF5DE8Ev6Tv8h9MDUSmAH32bglqchsEy4ZN7ux3HYiQDyE gsDLM/Pwvw7AA3G8qrKWvauhyMaU49NR7++VeCrqATyHQ9oAtAh5oXwTdWUQiATh3yho /FuLXHP2Jz9/latYzl4GujSlGjJqXl1PGbXYIGn0262H8UtnFMuvjH1kkjKARe80Fym4 Imsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:feedback-id:message-id:date:to:from :delivered-to:arc-authentication-results; bh=akCLcvJMUQenRDANc5wEObKup/xIyWQoBLZO3+jtoVQ=; b=hFVeSPH1euicz/KXa7aLK/lp1rK9KKKRgie/3bxJRJ7AejNWCUR5Sg7KZzpPh+UYuw Nsd/jDxCkj9KNEfhztQIELQdthQe0grxibfiCa4pB8vCRgX3F6OJPHJj+YIjHrqeEJOC 64TJlIOS3h3zHdFNpdsk9rWxO3RS9raSfQA6/L771frA14+FYYvhuxy4v5Zp6oBPhwSN Jym7l7sd+6ChJ081wbDGZfd9CFoA6o9kYkXu4EPTDI1brzE2nTsLPmJ22noXJuWxqWCt 5Mx88FpkmgijmD1gPQAnwhA3bNWRJeOGMZttl7nH2s5/Wf7ira32ETT7fjiyR/AKKq7O 5ntA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p23si3018248wmi.40.2017.09.03.20.25.25; Sun, 03 Sep 2017 20:25:26 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6928C68A1E6; Mon, 4 Sep 2017 06:25:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbg352.qq.com (SMTPBG352.QQ.COM [183.57.50.167]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 36973689F16 for <ffmpeg-devel@ffmpeg.org>; Mon, 4 Sep 2017 06:25:14 +0300 (EEST) X-QQ-mid: bizesmtp16t1504495412ta2r1arg Received: from localhost (unknown [47.90.47.25]) by esmtp4.qq.com (ESMTP) with id ; Mon, 04 Sep 2017 11:23:31 +0800 (CST) X-QQ-SSF: 01100000004000F0FH60B00A0000000 X-QQ-FEAT: r8geFCKg7nZhF2Mx1xbgihU/ffIld1Uz1c9LCsQhnlL96JYKMbVEr2d1NuaBB xD2p+Cl0lwmLXshMTS8saW94/qUITqishzFcKCjL/ar17FanzrlpjbjY+M5FRfKkHaIlOmv OGef66hoq3+pX6y918LdvFdFUuJ8zZZbR/qB26lmFF6is3pGxDBUXf/7KPlK6Gr2TLTHMgW vjvUwwVz7zEHjGtE6wCyU6dTlKFeVdWyfvCoQibPpCeMM0n31UT1Freeaxo+ju6QRqmDb1p k4KHJo9X+FIxkjyQvU4NWjgec= X-QQ-GoodBg: 0 From: Steven Liu <lq@chinaffmpeg.org> To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Sep 2017 11:23:29 +0800 Message-Id: <20170904032329.32670-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.10.1.382.ga23ca1b.dirty X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH] avformat/hls: return eof when avio_read data at the file end X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <http://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <http://ffmpeg.org/pipermail/ffmpeg-devel/> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <http://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Steven Liu <lq@chinaffmpeg.org>, Steven Liu <lq@onvideo.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> |
diff --git a/libavformat/hls.c b/libavformat/hls.c index 0995345bbf..7572fe6e06 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -898,6 +898,10 @@ static int read_from_url(struct playlist *pls, struct segment *seg, if (ret > 0) pls->cur_seg_offset += ret; + if (ret > 0 && ret < buf_size) { + ret = AVERROR_EOF; + } + return ret; }
fix ticket: #6490 Signed-off-by: Steven Liu <lq@onvideo.cn> --- libavformat/hls.c | 4 ++++ 1 file changed, 4 insertions(+)