mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 776661 - Initialize all of the bytes in the incoming data structure in silk_get_TOC; r=rillian
Fixes a warning under clang in dead code. Ehsan's original patch converted to upstream-carrying style and applied by rillian.
This commit is contained in:
parent
5a3b82b2dd
commit
058b1c7520
26
media/libopus/bug776661.patch
Normal file
26
media/libopus/bug776661.patch
Normal file
@ -0,0 +1,26 @@
|
||||
# HG changeset patch
|
||||
# Parent bfb616effc20e449c553b492876a9731352496f0
|
||||
Bug 776661 - Initialize all of the bytes in the incoming data structure in silk_get_TOC; r=rillian
|
||||
|
||||
diff --git a/media/libopus/silk/dec_API.c b/media/libopus/silk/dec_API.c
|
||||
--- a/media/libopus/silk/dec_API.c
|
||||
+++ b/media/libopus/silk/dec_API.c
|
||||
@@ -352,17 +352,17 @@ opus_int silk_get_TOC(
|
||||
|
||||
if( nBytesIn < 1 ) {
|
||||
return -1;
|
||||
}
|
||||
if( nFramesPerPayload < 0 || nFramesPerPayload > 3 ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
- silk_memset( Silk_TOC, 0, sizeof( Silk_TOC ) );
|
||||
+ silk_memset( Silk_TOC, 0, sizeof( *Silk_TOC ) );
|
||||
|
||||
/* For stereo, extract the flags for the mid channel */
|
||||
flags = silk_RSHIFT( payload[ 0 ], 7 - nFramesPerPayload ) & ( silk_LSHIFT( 1, nFramesPerPayload + 1 ) - 1 );
|
||||
|
||||
Silk_TOC->inbandFECFlag = flags & 1;
|
||||
for( i = nFramesPerPayload - 1; i >= 0 ; i-- ) {
|
||||
flags = silk_RSHIFT( flags, 1 );
|
||||
Silk_TOC->VADFlags[ i ] = flags & 1;
|
@ -357,7 +357,7 @@ opus_int silk_get_TOC(
|
||||
return -1;
|
||||
}
|
||||
|
||||
silk_memset( Silk_TOC, 0, sizeof( Silk_TOC ) );
|
||||
silk_memset( Silk_TOC, 0, sizeof( *Silk_TOC ) );
|
||||
|
||||
/* For stereo, extract the flags for the mid channel */
|
||||
flags = silk_RSHIFT( payload[ 0 ], 7 - nFramesPerPayload ) & ( silk_LSHIFT( 1, nFramesPerPayload + 1 ) - 1 );
|
||||
|
@ -61,3 +61,6 @@ echo "copied from revision ${version}"
|
||||
sed -e "s/^The git tag\/revision used was .*/The git tag\/revision used was ${version}./" \
|
||||
${TARGET}/README_MOZILLA > ${TARGET}/README_MOZILLA+ && \
|
||||
mv ${TARGET}/README_MOZILLA+ ${TARGET}/README_MOZILLA
|
||||
|
||||
# apply outstanding local patches
|
||||
patch -p3 < ./bug776661.patch
|
||||
|
Loading…
Reference in New Issue
Block a user