From patchwork Sat Jun 17 19:43:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hein-Pieter van Braam X-Patchwork-Id: 4011 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.22.4 with SMTP id 4csp221180vsw; Sat, 17 Jun 2017 12:43:47 -0700 (PDT) X-Received: by 10.223.150.170 with SMTP id u39mr11644135wrb.184.1497728627771; Sat, 17 Jun 2017 12:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497728627; cv=none; d=google.com; s=arc-20160816; b=Ap4ExDw42Ga0ijoAYnEoujE23pQMLVIxh000KiJHahg0Riexp47DhpqXAH5YqSJGdW VuvpfLeZi8/HBeldf6yB6QObhfHWJ4N1aCyqvGzbW2TjHNGONoLKevqyHBUMw6EnOx2y uGljY3WvnH9iKRmlfFJc5Ja6+g6pZKqb8Yzt+VWcGSUbGEplj2+TiPNqGnVq2pmhLccV /dWQJp/zmpbluq0JWqlcIeVvlblXJIjy5/LTQDOWnOFfbsKGGEYE7ghR8Gs5HgXhOepu 8WC3S1cvwylZ1wRqRRp0PlleePBYjzK+LO8cqr1AQW3/YurhGpmHUoAYSVNZk0BbVH0P ns0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:date:to:from:message-id :dkim-signature:dkim-filter:delivered-to:arc-authentication-results; bh=z82SKH+W0uGUAPL6iFJ1qI879MrqtcKf+/H9deIIgNk=; b=YQdcprGYNWpcJ8hg4M3UYSJFfqXPIV1M9RERIDVqqy3PX+YF5AAnTXoq/41Wyz/+a4 3aFtWSrG3mrp+pcNfR1eZWAgo5YzeX/7+roRwh8bnbz42YTxtWySmrju/GXyZvt9G0Ix UGkdsXpYspMg6M8QrwZSEPxbN7gR2ihdcqpFc3eENSVUCP96U1U3S+iLnyiQ4EOZqi+3 X7KOvDg2NFv+CRioimHmWStkG2ins71BqpAWY7MElpmLxfuWrF7sfKR87QCZ6QM3zD15 yrZLDGstd9XoSP4GH0yzxySkt64qjSub929bHEc8W06R82P2k2BWqMeLsFzMT1Gq0HYH sOyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@tmm.cx header.b=MDto3KPs; 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=REJECT dis=NONE) header.from=tmm.cx Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a77si6045514wmi.19.2017.06.17.12.43.47; Sat, 17 Jun 2017 12:43:47 -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=@tmm.cx header.b=MDto3KPs; 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=REJECT dis=NONE) header.from=tmm.cx Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 20F7068A438; Sat, 17 Jun 2017 22:43:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from eva.tmm.cx (eva.tmm.cx [5.9.73.21]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D0D468A429 for ; Sat, 17 Jun 2017 22:43:34 +0300 (EEST) Received: from lola (unknown [92.110.172.3]) by eva.tmm.cx (Postfix) with ESMTPSA id C0F6F17CD0F5 for ; Sat, 17 Jun 2017 19:43:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 eva.tmm.cx C0F6F17CD0F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tmm.cx; s=mail; t=1497728618; bh=2uy2qR7DBB0qeoMZ0hwtp9qvuAwwxt8QUw6fyX2e/+8=; h=Subject:From:To:Date:From; b=MDto3KPs78KZkskDZWj89G4VTc88UPz6mJHWUlLoPapZcxhG86UiqHr7xsFU3q6Sy JL5TAlrXvOotXy/xZwQ65EwYeNQmMLfuwBPQQFkSuRl7aBZ06O8er9nc9l7VsuC2Nh TT9nJM0vbCPavJ2VnUkEM3pbu2UTbdwKVpiRnGpI= Message-ID: <1497728616.3919.17.camel@tmm.cx> From: Hein-Pieter van Braam To: FFmpeg development discussions and patches Date: Sat, 17 Jun 2017 21:43:36 +0200 X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) Mime-Version: 1.0 X-Spam-Status: No, score=0.0 required=2.4 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on eva.tmm.cx Subject: [FFmpeg-devel] [PATCH] Cleanly exit at the end of an Interplay MVE 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Interplay movies signal the end of the stream, currently decoding continues and eventually returns AVERROR_INVALIDDATA. This honors the MVE CHUNK_END and CHUNK_SHUTDOWN types. Signed-off-by: Hein-Pieter van Braam ---  libavformat/ipmovie.c | 2 ++  1 file changed, 2 insertions(+) --  2.9.4 diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c index 5636156..b9c128d 100644 --- a/libavformat/ipmovie.c +++ b/libavformat/ipmovie.c @@ -702,6 +702,8 @@ static int ipmovie_read_packet(AVFormatContext *s,          ret = AVERROR(EIO);      else if (ret == CHUNK_NOMEM)          ret = AVERROR(ENOMEM); +    else if (ret == CHUNK_END || ret == CHUNK_SHUTDOWN) +        ret = AVERROR_EOF;      else if (ret == CHUNK_VIDEO)          ret = 0;      else if (ret == CHUNK_INIT_VIDEO || ret == CHUNK_INIT_AUDIO)