From owner-svn-ports-all@freebsd.org Thu Oct 26 00:59:26 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ABE1E57F97; Thu, 26 Oct 2017 00:59:26 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 148373DAE; Thu, 26 Oct 2017 00:59:26 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9Q0xPqB058181; Thu, 26 Oct 2017 00:59:25 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9Q0xPAv058179; Thu, 26 Oct 2017 00:59:25 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201710260059.v9Q0xPAv058179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Thu, 26 Oct 2017 00:59:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r452899 - in head/www/firefox: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/www/firefox: . files X-SVN-Commit-Revision: 452899 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 00:59:26 -0000 Author: jbeich Date: Thu Oct 26 00:59:24 2017 New Revision: 452899 URL: https://svnweb.freebsd.org/changeset/ports/452899 Log: www/firefox: better support ffmpeg 3.4 for media.ffvpx.enabled=false Obtained from: upstream (Firefox 58) Added: head/www/firefox/files/patch-bug1366201 (contents, props changed) Modified: head/www/firefox/Makefile (contents, props changed) Modified: head/www/firefox/Makefile ============================================================================== --- head/www/firefox/Makefile Wed Oct 25 23:01:36 2017 (r452898) +++ head/www/firefox/Makefile Thu Oct 26 00:59:24 2017 (r452899) @@ -4,7 +4,7 @@ PORTNAME= firefox DISTVERSION= 56.0.2 DISTVERSIONSUFFIX=.source -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ Added: head/www/firefox/files/patch-bug1366201 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox/files/patch-bug1366201 Thu Oct 26 00:59:24 2017 (r452899) @@ -0,0 +1,40 @@ +commit 139967a109c1 +Author: Jean-Yves Avenard +Date: Wed Oct 25 18:25:37 2017 +0200 + + Bug 1366201 - P5. Get around FFmpeg bug with corrupted data. r=gerald + + According to FFmpeg documentation, the out parameter is "set to size of parsed buffer or zero if not yet finished. " however this is only the case if no error occurred; otherwise it is left untouched. + + We want the invalid content to generate a decoding error, so we set size to inputSize to ensure decoding failed later. + + MozReview-Commit-ID: FZeiZUdUtLG +--- + dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +index 6acc8fef4dd8..fdee880c9e3b 100644 +--- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp ++++ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +@@ -212,18 +212,18 @@ FFmpegVideoDecoder::DoDecode(MediaRawData* aSample, bool* aGotFrame, + + #if LIBAVCODEC_VERSION_MAJOR >= 54 + if (inputSize && mCodecParser && (mCodecID == AV_CODEC_ID_VP8 + #if LIBAVCODEC_VERSION_MAJOR >= 55 + || mCodecID == AV_CODEC_ID_VP9 + #endif + )) { + while (inputSize) { +- uint8_t* data; +- int size; ++ uint8_t* data = inputData; ++ int size = inputSize; + int len = mLib->av_parser_parse2( + mCodecParser, mCodecContext, &data, &size, inputData, inputSize, + aSample->mTime.ToMicroseconds(), aSample->mTimecode.ToMicroseconds(), + aSample->mOffset); + if (size_t(len) > inputSize) { + return NS_ERROR_DOM_MEDIA_DECODE_ERR; + } + inputData += len;