From patchwork Mon Oct 17 16:29:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 1034 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp372731vsd; Mon, 17 Oct 2016 09:29:53 -0700 (PDT) X-Received: by 10.25.212.136 with SMTP id l130mr16305798lfg.73.1476721793187; Mon, 17 Oct 2016 09:29:53 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g63si19427613ljg.97.2016.10.17.09.29.52; Mon, 17 Oct 2016 09:29:53 -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 1B31A689AA0; Mon, 17 Oct 2016 19:29:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-2.mx.upcmail.net (vie01a-dmta-pe03-2.mx.upcmail.net [62.179.121.161]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9A843689751 for ; Mon, 17 Oct 2016 19:29:42 +0300 (EEST) Received: from [172.31.216.44] (helo=vie01a-pemc-psmtp-pe02) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bwAnI-0002Gv-2Z for ffmpeg-devel@ffmpeg.org; Mon, 17 Oct 2016 18:29:44 +0200 Received: from [192.168.1.3] ([80.110.105.101]) by vie01a-pemc-psmtp-pe02 with SMTP @ mailcloud.upcmail.net id wgVi1t0142BGtRc01gVjht; Mon, 17 Oct 2016 18:29:44 +0200 X-SourceIP: 80.110.105.101 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Mon, 17 Oct 2016 18:29:42 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201610171829.42782.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH/RFC]lavf/avidec: Do not fail for very large idx1 tags 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" Hi! Attached patch fixes the file mentioned in github pull request 197, it can be played with MPlayer, vlc, xine and totem. Please comment, Carl Eugen From 646a765749e08bb48f74488ad9f539cbc736673c Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 17 Oct 2016 18:25:48 +0200 Subject: [PATCH] lavf/avidec: Do not fail for very large idx1 tags. Fixes demuxing the sample file from github pull request 197, the size of its idx1 tag is 6171936 bytes, followed by a JUNK tag of 9505704 bytes. --- libavformat/avidec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 2c81267..b291625 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -993,6 +993,8 @@ FF_ENABLE_DEPRECATION_WARNINGS avi->movi_end = avi->fsize; goto end_of_header; } + /* Do not fail for very large idx1 tags */ + case MKTAG('i', 'd', 'x', '1'): /* skip tag */ size += (size & 1); avio_skip(pb, size);