From patchwork Fri Apr 20 07:37:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dongshengwang110@gmail.com X-Patchwork-Id: 8531 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp364926jad; Fri, 20 Apr 2018 00:37:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+U4fRU4EzzlzjBmozQZjyKm8sp1BDfOeAqeYYZtPhjESF7YkJg9FfWr29+cMn5LftknCdj X-Received: by 10.28.89.138 with SMTP id n132mr1021688wmb.18.1524209878855; Fri, 20 Apr 2018 00:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524209878; cv=none; d=google.com; s=arc-20160816; b=0iMh0egHhdEqLe1QWOzFF3ViG/12UzjOGy92jbtNQDYDuk/98UNy8nKEuAK2HsToIM bTx3xPLxCsLAOH0bzvDPc9o1mDE2GXFDVKSMyP+xq7ulvPUaL/dY+mK93FSwSZqvuOLA dQ593HSMa62kIIzKqUzsYbME+NctLSdeEGfVbXjtj87ydEfVwqBOJtIY8KJqh+B5TOON ADw/790GpUzzxEOW2iurocyqEKIw9RmvyqCBCuqOsd8FQbvortHLjG6jAItPrI88BHy8 ojLg/8/ezqnkOqUc0daE8bIyqL65Khh3HsyiZQ80p1Nslhu15F4KrLIP0tWVKPgRk2us QHtg== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=MP+7/747LEpOeV+vc2hW+F9VEtVjmpKvt3zEDRbbSXg=; b=ASloJm27rdoXCP+OwSueGD3fHmeQfO4TnnBAJMBMPikrbfSTUjLyEht3Oxrfb0OUfJ yIxwQUQQfm4ps1nNpjEAhJbamCzT80E5cx7VkPIR81t6HPtPBtVX/QVHS53NLoMnYaPT YUEeTcKPxBT217pkLsZDjT/w5i4RTA3L4vH8hbMfBKONsOdWwRdJdtwrxM9yAh+HUJ9k pdqJOME/kwAcrRllwDpa1MfxB0xKrsonhuMCZvnNFo6AGpw6lxSF8AXKrg5k1VJpJBQ3 iI6UrZ1WVjisqpL1hYMvgS6Dey20YLr9yQTPrm1IdBsCRWvNjSe7owEFzyCK5cH6wVpo ep6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=S1R8SQt/; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 71si687264wmg.60.2018.04.20.00.37.58; Fri, 20 Apr 2018 00:37:58 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=S1R8SQt/; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ABFF268A188; Fri, 20 Apr 2018 10:37:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5FE6F689E35 for ; Fri, 20 Apr 2018 10:37:23 +0300 (EEST) Received: by mail-pl0-f66.google.com with SMTP id t22-v6so4784665plo.7 for ; Fri, 20 Apr 2018 00:37:51 -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:in-reply-to:references; bh=MjRkAHsa0DNst5AptqLpa4R2NQ/ypF/Ijsq/nPJKot4=; b=S1R8SQt/QST7oCWr9kswqo+sGwzln3Tj5YZF1T5npit1T6YgXL+WPRyePSdKlkCnwM aRPxUueg+rmTQntATP3kGD4Kh/lzLWn750acSQ0+v+MDHSxPLxK51atg7XOCSCPGp2Nq bGd2imU65y1q5wFeNzNajiX9ioiuYvnO1YyIbYoBzIIB5lAqiKnbRFjzkbtOWyLfp3Vj b5SQL+Vd8J0VDPhZHwILmOp9Ne4clpYg8DCKesUPWp7YXJQ1HFomb1rTmtdrMdiKgXoT 6sbstpGl77eUW9BK4ShZRGXCCqpSkJ3UcgjpdkLUiDUWt0AXfYT48lt66+Zb6PZciP+C Ezvw== 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:in-reply-to :references; bh=MjRkAHsa0DNst5AptqLpa4R2NQ/ypF/Ijsq/nPJKot4=; b=gr+hBk6CfJezyXywkQf7PXljMoNNkYE+GcyKUeeslx88FQpKLpTqe9Zd2J+rrB/ccT tsi1cUKVxLXoCPy9TPjqYquelJWRnnws2uACsIF+vViaircQyJ1KtCWwufi3WruYgH6B V4Tlqj/F3AxuARbR4m0qCybkkTL3CgwsF/sUuDxi45gtXqOpIoWitJaZa++6IDgusO2H 5SHhKOLhqfDvntzEFHj6H3AZ+Drxwqh/wKUNdPkO8to4WWHG+vYPer671/cYSLKVlHXW QUNBs0Ms1opYb2glZSe6/XyEdKJDT7+XGM+jbgvkXiEWDWKhZvZ5hUh34oJEcsCnnY/0 pzyw== X-Gm-Message-State: ALQs6tCxie2LMP8r/KeOTAXixPB1ofME7NgGPR7aUmYRKjz+HCENYvPO mYNG/CaYK7bbe6RFIYy0ZuoDSg== X-Received: by 2002:a17:902:7d10:: with SMTP id z16-v6mr9151275pll.79.1524209869498; Fri, 20 Apr 2018 00:37:49 -0700 (PDT) Received: from localhost.localdomain (210-140-85-135.jp-east.compute.idcfcloud.com. [210.140.85.135]) by smtp.gmail.com with ESMTPSA id b72sm3344567pfm.69.2018.04.20.00.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Apr 2018 00:37:48 -0700 (PDT) From: dongsheng wang X-Google-Original-From: dongsheng wang To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 Apr 2018 15:37:41 +0800 Message-Id: <20180420073741.18508-1-dongsheng7@staff.weibo.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: References: Subject: [FFmpeg-devel] [PATCH] avformat/dashdec.c: dash refair seg size error, 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: dongshengwang , dongsheng7 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: dongsheng7 the seg size is 25 - 10 + 1 = 16, not 15(=25-10). Signed-off-by: dongshengwang --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 6304ad933b..b07ed4f8f2 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -588,7 +588,7 @@ static struct fragment * get_Fragment(char *range) char *str_end_offset; char *str_offset = av_strtok(range, "-", &str_end_offset); seg->url_offset = strtoll(str_offset, NULL, 10); - seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset; + seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset + 1; } return seg;