summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media/libtremor/README_MCP7
-rw-r--r--media/libtremor/README_MOZILLA7
-rw-r--r--media/libtremor/bug1117571-r19420.patch18
-rw-r--r--media/libtremor/bug719612.patch21
-rw-r--r--media/libtremor/lib/misc.h4
-rw-r--r--media/libtremor/lib/moz.build3
-rw-r--r--media/libtremor/lib/tremor_floor0.c1
-rw-r--r--media/libtremor/lib/tremor_floor1.c5
-rw-r--r--media/libtremor/lib/tremor_info.c13
-rw-r--r--media/libtremor/lib/tremor_mdct.c2
-rw-r--r--media/libtremor/lib/tremor_synthesis.c2
-rwxr-xr-xmedia/libtremor/update.sh4
12 files changed, 31 insertions, 56 deletions
diff --git a/media/libtremor/README_MCP b/media/libtremor/README_MCP
new file mode 100644
index 0000000000..a1d2bd12ec
--- /dev/null
+++ b/media/libtremor/README_MCP
@@ -0,0 +1,7 @@
+The source from this directory was copied from the libtremor
+git repository using the update.sh script. The only changes
+made were those applied by update.sh and the addition/update of
+Makefile.in files for the UXP build system.
+
+The upstream release used was https://gitlab.xiph.org/xiph/tremor
+The git revision used was 7c30a66346199f3f09017a09567c6c8a3a0eedc8.
diff --git a/media/libtremor/README_MOZILLA b/media/libtremor/README_MOZILLA
deleted file mode 100644
index ee67b53a05..0000000000
--- a/media/libtremor/README_MOZILLA
+++ /dev/null
@@ -1,7 +0,0 @@
-The source from this directory was copied from the libtremor
-subversion repository using the update.sh script. The only changes
-made were those applied by update.sh and the addition/upate of
-Makefile.in files for the Mozilla build system.
-
-The upstream release used was http://svn.xiph.org/trunk/Tremor/
-The subversion revision used was r17547.
diff --git a/media/libtremor/bug1117571-r19420.patch b/media/libtremor/bug1117571-r19420.patch
deleted file mode 100644
index 02de5e68ff..0000000000
--- a/media/libtremor/bug1117571-r19420.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -r 55f3224d7513 media/libtremor/lib/tremor_synthesis.c
---- a/media/libtremor/lib/tremor_synthesis.c Sat Jan 03 20:02:33 2015 -0800
-+++ b/media/libtremor/lib/tremor_synthesis.c Sun Jan 04 11:17:29 2015 -0800
-@@ -119,13 +119,13 @@ long vorbis_packet_blocksize(vorbis_info
- while(v>1){
- modebits++;
- v>>=1;
- }
-
- /* read our mode and pre/post windowsize */
- mode=oggpack_read(&opb,modebits);
- }
-- if(mode==-1)return(OV_EBADPACKET);
-+ if(mode==-1 || !ci->mode_param[mode])return(OV_EBADPACKET);
- return(ci->blocksizes[ci->mode_param[mode]->blockflag]);
- }
-
-
diff --git a/media/libtremor/bug719612.patch b/media/libtremor/bug719612.patch
deleted file mode 100644
index 36ac84f66c..0000000000
--- a/media/libtremor/bug719612.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/media/libtremor/lib/tremor_floor1.c b/media/libtremor/lib/tremor_floor1.c
---- a/media/libtremor/lib/tremor_floor1.c
-+++ b/media/libtremor/lib/tremor_floor1.c
-@@ -103,16 +103,17 @@ static vorbis_info_floor *floor1_unpack
-
- /* read the post list */
- info->mult=oggpack_read(opb,2)+1; /* only 1,2,3,4 legal now */
- rangebits=oggpack_read(opb,4);
- if(rangebits<0)goto err_out;
-
- for(j=0,k=0;j<info->partitions;j++){
- count+=info->class_dim[info->partitionclass[j]];
-+ if(count>VIF_POSIT)goto err_out;
- for(;k<count;k++){
- int t=info->postlist[k+2]=oggpack_read(opb,rangebits);
- if(t<0 || t>=(1<<rangebits))
- goto err_out;
- }
- }
- info->postlist[0]=0;
- info->postlist[1]=1<<rangebits;
diff --git a/media/libtremor/lib/misc.h b/media/libtremor/lib/misc.h
index 2fc521a244..1ae4d2e813 100644
--- a/media/libtremor/lib/misc.h
+++ b/media/libtremor/lib/misc.h
@@ -49,7 +49,9 @@ union magic {
} halves;
ogg_int64_t whole;
};
-#elif BYTE_ORDER==BIG_ENDIAN
+#endif
+
+#if BYTE_ORDER==BIG_ENDIAN
union magic {
struct {
ogg_int32_t hi;
diff --git a/media/libtremor/lib/moz.build b/media/libtremor/lib/moz.build
index 60523504eb..ded81ee72b 100644
--- a/media/libtremor/lib/moz.build
+++ b/media/libtremor/lib/moz.build
@@ -1,4 +1,5 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -23,7 +24,7 @@ FINAL_LIBRARY = 'gkmedias'
if CONFIG['OS_ARCH'] == 'AIX':
DEFINES['alloca'] = '__alloca'
-if CONFIG['TARGET_CPU'] == 'arm' and CONFIG['GNU_CC'] and not CONFIG['MOZ_THUMB2']:
+if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc') and not CONFIG['MOZ_THUMB2']:
DEFINES['_ARM_ASSEM_'] = True
LOCAL_INCLUDES += [
diff --git a/media/libtremor/lib/tremor_floor0.c b/media/libtremor/lib/tremor_floor0.c
index 9f3ef56014..964383eff0 100644
--- a/media/libtremor/lib/tremor_floor0.c
+++ b/media/libtremor/lib/tremor_floor0.c
@@ -328,6 +328,7 @@ static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){
info->books[j]=oggpack_read(opb,8);
if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out;
if(ci->book_param[info->books[j]]->maptype==0)goto err_out;
+ if(ci->book_param[info->books[j]]->dim<1)goto err_out;
}
return(info);
diff --git a/media/libtremor/lib/tremor_floor1.c b/media/libtremor/lib/tremor_floor1.c
index 12a687ec53..e63ae9fb34 100644
--- a/media/libtremor/lib/tremor_floor1.c
+++ b/media/libtremor/lib/tremor_floor1.c
@@ -426,7 +426,7 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
int hx=0;
int lx=0;
int ly=fit_value[0]*info->mult;
- /* guard lookup against out-of-rage values */
+ /* guard lookup against out-of-range values */
ly=(ly<0?0:ly>255?255:ly);
for(j=1;j<look->posts;j++){
@@ -436,10 +436,9 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
hx=info->postlist[current];
hy*=info->mult;
- /* guard lookup against out-of-rage values */
+ /* guard lookup against out-of-range values */
hy=(hy<0?0:hy>255?255:hy);
-
render_line(n,lx,hx,ly,hy,out);
lx=hx;
diff --git a/media/libtremor/lib/tremor_info.c b/media/libtremor/lib/tremor_info.c
index 3f3308ef95..24e24ac728 100644
--- a/media/libtremor/lib/tremor_info.c
+++ b/media/libtremor/lib/tremor_info.c
@@ -227,7 +227,6 @@ static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
int i;
- if(!ci)return(OV_EFAULT);
/* codebooks */
ci->books=oggpack_read(opb,8)+1;
@@ -367,6 +366,10 @@ int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op)
/* um... we didn't get the initial header */
return(OV_EBADHEADER);
}
+ if(vc->vendor!=NULL){
+ /* previously initialized comment header */
+ return(OV_EBADHEADER);
+ }
return(_vorbis_unpack_comment(vc,&opb));
@@ -375,6 +378,14 @@ int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op)
/* um... we didn;t get the initial header or comments yet */
return(OV_EBADHEADER);
}
+ if(vi->codec_setup==NULL){
+ /* improperly initialized vorbis_info */
+ return(OV_EFAULT);
+ }
+ if(((codec_setup_info *)vi->codec_setup)->books>0){
+ /* previously initialized setup header */
+ return(OV_EBADHEADER);
+ }
return(_vorbis_unpack_books(vi,&opb));
diff --git a/media/libtremor/lib/tremor_mdct.c b/media/libtremor/lib/tremor_mdct.c
index 4f39e7d531..2aed62c51c 100644
--- a/media/libtremor/lib/tremor_mdct.c
+++ b/media/libtremor/lib/tremor_mdct.c
@@ -13,7 +13,7 @@
function: normalized modified discrete cosine transform
power of two length transform only [64 <= n ]
- last mod: $Id: mdct.c,v 1.9 2002/10/16 09:17:39 xiphmont Exp $
+ last mod: $Id$
Original algorithm adapted long ago from _The use of multirate filter
banks for coding of high quality digital audio_, by T. Sporer,
diff --git a/media/libtremor/lib/tremor_synthesis.c b/media/libtremor/lib/tremor_synthesis.c
index c7680f6d02..d22cb823c1 100644
--- a/media/libtremor/lib/tremor_synthesis.c
+++ b/media/libtremor/lib/tremor_synthesis.c
@@ -67,7 +67,7 @@ static int _vorbis_synthesis1(vorbis_block *vb,ogg_packet *op,int decodep){
/* more setup */
vb->granulepos=op->granulepos;
- vb->sequence=op->packetno-3; /* first block is third packet */
+ vb->sequence=op->packetno; /* first block is third packet */
vb->eofflag=op->e_o_s;
if(decodep){
diff --git a/media/libtremor/update.sh b/media/libtremor/update.sh
index d27198cfe5..075343c82d 100755
--- a/media/libtremor/update.sh
+++ b/media/libtremor/update.sh
@@ -30,5 +30,5 @@ cp $1/ivorbiscodec.h ./include/tremor/ivorbiscodec.h
cp $1/os.h ./lib/os.h
cp $1/COPYING ./COPYING
cp $1/README ./README
-patch -p3 < ./bug719612.patch
-patch -p3 < ./bug1117571-r19420.patch
+
+echo "Remember to update the version details at README_MCP."