Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2017 00:59:25 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r452899 - in head/www/firefox: . files
Message-ID:  <201710260059.v9Q0xPAv058179@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <jyavenard@mozilla.com>
+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<LIBAV_VER>::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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710260059.v9Q0xPAv058179>