From patchwork Tue May 15 15:07:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 8977 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp1574467jad; Tue, 15 May 2018 08:23:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp4egcoqHnsAqj4Fcr1oBs0383FijV8O5mIMBZS047rUHUP8+NPa3FMo319KcLMV/JkBZGM X-Received: by 2002:adf:85b8:: with SMTP id 53-v6mr11671762wrt.31.1526397803981; Tue, 15 May 2018 08:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526397803; cv=none; d=google.com; s=arc-20160816; b=wRgEfQGo+7MINHLiq6rLDlyJqRl3SHiAC7Fi/vgieOafxJwLRNUsq0PMYeATao3LDy tThIaNt35dlBdmfELLWZiFYL2wR1xVwBO1tzHZdH42YrYaCFcZaTr/otKptC/k0Aebk1 G/ytIJbNvU1+h7iI6XcdyNdBMnZX0kN4zt2hG2f4ukNguZMyOjrBAMvCzY/AZwdM26tU 1hZIqHLImTTH710DGuqt0opgEDFHQ50BQgjrxV1BFnkEX0rjC3NqZKTSe1a8DBsUM84y CyrxfurC2W6hdYTzx1NAihxRKwxWZ8TwXHT9dVIwrhA+zttKnaLheipijIGEzpmuVDNK E9Cw== 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: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:delivered-to:arc-authentication-results; bh=UfEZRF2wRqxS1pwxrsMbv0c3oDMMnsmcLo+H3UdHjQQ=; b=yBU2cF/MuNXFt72BuEd5fu6b/emhvok1nYAg2MBo5yMYTVuXhHAnoU/JhZfrz8qsm+ iteAC+ouzN258Zfu0uVJt+JmC4LjNLLJ7H+nx4kytGivbPQTdfmzOZ6KQIT1X8RBAjTd QyNoCap0XrrJjZL6XIKx3vvZURqHhs4q51VRfIm+1jDXTJYptC2ndlqf+FKifS3yt7Bx u3ry5NOa4UC086vlFbIS1Sdj8jfWZAafdA+ifXchbkUZ9tns4AqnjiLwy/YbMmKjYXEf plF9D1ErDO+mdslVSaY11EEmSXKh/ZHvXJq5VAC9EM6wxgVuwyEHmsW9lBX2c9DmbIWz gmgQ== 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 b79-v6si241395wrd.260.2018.05.15.08.23.23; Tue, 15 May 2018 08:23:23 -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 34178689767; Tue, 15 May 2018 18:22:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-3.mx.upcmail.net (vie01a-qmta-pe01-3.mx.upcmail.net [62.179.121.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D348B680AD4 for ; Tue, 15 May 2018 18:22:38 +0300 (EEST) Received: from [172.31.218.32] (helo=vie01a-dmta-pe01-2.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fIbZ8-00022x-3t for ffmpeg-devel@ffmpeg.org; Tue, 15 May 2018 17:08:38 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fIbZ2-00039S-S0 for ffmpeg-devel@ffmpeg.org; Tue, 15 May 2018 17:08:32 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id mf8W1x02Y0S5wYM01f8X6e; Tue, 15 May 2018 17:08:31 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 15 May 2018 17:07:00 +0200 Message-Id: <20180515150700.4638-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515150700.4638-1-michael@niedermayer.cc> References: <20180515150700.4638-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/2] avformat/mov: Only fail for STCO/STSC contradictions if both exist 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" Fixes regression with playback of GF9720Repeal20the20Eighth20with20Helen20Linehan.m4a See: crbug 822666 Found-by: "Mattias Wadman Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 4848a106f2..a078bf4712 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4148,7 +4148,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) st->index); return 0; } - if (sc->stsc_count && sc->stsc_data[ sc->stsc_count - 1 ].first > sc->chunk_count) { + if (sc->chunk_count && sc->stsc_count && sc->stsc_data[ sc->stsc_count - 1 ].first > sc->chunk_count) { av_log(c->fc, AV_LOG_ERROR, "stream %d, contradictionary STSC and STCO\n", st->index); return AVERROR_INVALIDDATA;