From patchwork Wed Sep 7 02:10:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Gregan X-Patchwork-Id: 458 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp78401vsd; Tue, 6 Sep 2016 19:10:42 -0700 (PDT) X-Received: by 10.194.30.97 with SMTP id r1mr17692027wjh.8.1473214242411; Tue, 06 Sep 2016 19:10:42 -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 w197si1693883wmf.103.2016.09.06.19.10.40; Tue, 06 Sep 2016 19:10:42 -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=@flim.org; 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 8A8F968A03E; Wed, 7 Sep 2016 05:10:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from flim.org (flim.org [65.99.223.158]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1D3F1689CD5 for ; Wed, 7 Sep 2016 05:10:19 +0300 (EEST) Received: from localhost (unknown [121.98.49.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by flim.org (Postfix) with ESMTPSA id 168F81415C for ; Wed, 7 Sep 2016 02:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flim.org; s=default; t=1473214226; bh=F+o6Ru1u2DNwj5df7S2WCeRZBpVf5ZttQD80sAx7C2E=; h=Date:From:To:Subject:From; b=XIF4jVebN/DhRWKNEpaRna7uzU/ZbmK+zNFHhVgRJWT69Ibd1dN6Vjyb+kJ+tZ+ME OyDv9bbGKrgOIMO9O8KeE3SezHeyuopNYw0pDWuvpGTLtbZ7I9C28o8CZIrd2nc0yV Oiu1yQ11XFynCtauIJYANFPlM1H10MDuMzzE3sCo= Date: Wed, 7 Sep 2016 14:10:23 +1200 From: Matthew Gregan To: ffmpeg-devel@ffmpeg.org Message-ID: <20160907021023.GA13510@brak.lan> Mail-Followup-To: ffmpeg-devel@ffmpeg.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [FFmpeg-devel] [PATCH] avformat/mov: Enable header parsing for VP9. 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, The attached patch fixes playback of MP4/VP9 media containing superframes when using the built-in VP9 decoder. As an example, https://github.com/Netflix/vp9-dash/raw/master/DASH-Samples/Fountain_2997_0560kbps_640x480_4x3PAR.ivf_DashUnencrypted.ismv plays with corrupted frames using ffplay without this patch and works fine with the patch applied (or with libvpx built with --enable-vp9-highbitdepth forced via -vcodec libvpx). Cheers, From 561c7e9ad45384437124d2d7293c15bfa3712ebb Mon Sep 17 00:00:00 2001 From: Matthew Gregan Date: Wed, 7 Sep 2016 13:58:30 +1200 Subject: avformat/mov: Enable header parsing for VP9. MP4 media containing VP9 using superframes (such as https://github.com/Netflix/vp9-dash/raw/master/DASH-Samples/Fountain_2997_0560kbps_640x480_4x3PAR.ivf_DashUnencrypted.ismv) does not decode correctly with the built-in VP9 decoder because superframes are passed to the decoder whole rather than split into individual frames. Signed-off-by: Matthew Gregan diff --git a/libavformat/mov.c b/libavformat/mov.c index f499906..faa682a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2163,6 +2163,9 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb, case AV_CODEC_ID_VC1: st->need_parsing = AVSTREAM_PARSE_FULL; break; + case AV_CODEC_ID_VP9: + st->need_parsing = AVSTREAM_PARSE_HEADERS; + break; default: break; } -- 2.9.3