From patchwork Thu Sep 28 15:11:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Montilla X-Patchwork-Id: 5323 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.36.26 with SMTP id f26csp930436jaa; Thu, 28 Sep 2017 08:18:05 -0700 (PDT) X-Received: by 10.28.168.69 with SMTP id r66mr1430662wme.2.1506611885507; Thu, 28 Sep 2017 08:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506611885; cv=none; d=google.com; s=arc-20160816; b=oWr0v0WqoqslacgmBjSv0BsyI1/6BBDR1gsz4gvS0k/LMe7oeYxvGdhzPm/XfTrqTV NCfrL1khrBa33xDoxfOFFn1uj2G25iIe2mKi4iSw5BbXVY1wabTIJuv9znDPClRJnx5k 66m2+1PccpoS59ZLzbnEt8XzAKh2AD4758Hpcm+jrr0T2qkQs1PNDYv2X38cVwhdKCqS aGZ/kY0lYDkuZ/HM02r61gRdLBPMu5WHgAyb0yIvqDE556VHOhi0TNU8ccM1x76z2uX4 8DLVNbns2tD3XAw3NdgysI6OaRlnBGc5ttuVAeS2egJy0xpeeJJEwZDfli0zqSEvg/1D m1gw== 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:message-id:date:to:from:delivered-to :arc-authentication-results; bh=DiTMIjlSOFREc1Ss6QE5QMLsJPr6TCnWmIwjTPuDiH8=; b=LVLgGX3Mtmjgp4L+zFVTyw0hmzB1xJUuimHDPuHfvcQSI6hnMlan6hXX9RBYQlKB9v fIrQl3v6xBJ/jk0kThwSeXO/rWUutOfQlRVKXepN6vrZOe5VXcv7PCVK215X4QrfxHZC Gw7bAxuLNR/WkHp0rdqbF0QQJLMnpwQWlqFJyltw4WTIXrtR3wbfHCXRPtPGTIngCvDj 5uOM2YjhUZrai9rOg0AjWhAxXo5NuyehqSCuH/zeTvhIbG3Pn4yhO4DjEDmIJY9OCzVm fdEPTfMeAOzF0XEVCo3kx/1eEuDdvP2BSvxV8wF2v8ACjxhUXjAVlUVhVT0STH10ifL3 yuDQ== 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: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x194si949709wme.55.2017.09.28.08.18.04; Thu, 28 Sep 2017 08:18:05 -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 96603689221; Thu, 28 Sep 2017 18:17:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7C89D680640 for ; Thu, 28 Sep 2017 18:17:43 +0300 (EEST) Received: by mail-qt0-f194.google.com with SMTP id l25so2082553qtf.13 for ; Thu, 28 Sep 2017 08:17:56 -0700 (PDT) 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=3PBsyMJBwNqClnYV29n6zvAVHX7j2jdYQnnjqNOS5/s=; b=JrjNbHuNnl4iaaorHdmTbWy5ba7HVXwh6HyZT8mSt0MAvV33sMBuEvT+vwlz4OVTtx uU4I+DNFkoDGlWjXn9+TAyfgRCsMVz81tJCzj/bkfSXlGJRsrEOyy4tNpiaJywNLhaaL YYGi/SETyhjMERoIu8rl3CrDxyzx8YNydWVrIsHHV5imv/9i/VRAEEpD0mqdD70fwQZx QyUOm0c73USf91C+SNqDyZIhkK2ynv/awr3LTahyAxPcaOU7wQpAg7WPNfJmrdt4ljqw LoympHWWz4anMjEVXMOJEP3NMZW7VTg94z3MfjTUC6KEE24KW+UE9orkXUSmipJOPIuG Qq+w== X-Gm-Message-State: AMCzsaVgOgdu+HvfDruVo9PJ1Su7AzKEi0LVmfRthBCjv1A01uR33RJ3 CIRWpAgm/v5EStKwGQNF4cU1lHbr X-Google-Smtp-Source: AOwi7QDC4FlIFyJcUZP2KLiNxUcvi1/J5/NuFQNpp5EBv7ZD0YDrVd9g9FAYdr5c63k9g3owkx9jnA== X-Received: by 10.200.24.187 with SMTP id s56mr1535074qtj.64.1506611546586; Thu, 28 Sep 2017 08:12:26 -0700 (PDT) Received: from localhost.localdomain (r167-62-129-104.dialup.adsl.anteldata.net.uy. [167.62.129.104]) by smtp.gmail.com with ESMTPSA id l41sm1228922qtc.13.2017.09.28.08.12.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Sep 2017 08:12:25 -0700 (PDT) From: Pablo Montilla To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Sep 2017 12:11:48 -0300 Message-Id: <20170928151148.11452-1-melkor@odyssey.com.uy> X-Mailer: git-send-email 2.13.3.windows.1 Subject: [FFmpeg-devel] [PATCH] Fixes bug https://trac.ffmpeg.org/ticket/6700. 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: Pablo Montilla MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavformat/isom.h | 2 +- libavformat/mov.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index fdd98c28f5..a32b92ccdd 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -52,7 +52,7 @@ struct AVAESCTR; */ typedef struct MOVStts { - int count; + unsigned int count; int duration; } MOVStts; diff --git a/libavformat/mov.c b/libavformat/mov.c index 2de60b2159..9cfc860c18 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2658,15 +2658,11 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) for (i = 0; i < entries && !pb->eof_reached; i++) { int sample_duration; - int sample_count; + unsigned int sample_count; sample_count=avio_rb32(pb); sample_duration = avio_rb32(pb); - if (sample_count < 0) { - av_log(c->fc, AV_LOG_ERROR, "Invalid sample_count=%d\n", sample_count); - return AVERROR_INVALIDDATA; - } sc->stts_data[i].count= sample_count; sc->stts_data[i].duration= sample_duration;