gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-116-g97ce2c5
Date: Wed, 23 Feb 2011 00:41:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  97ce2c57bf3c33d9cf9bde37ed7e5ffc49c48177 (commit)
      from  9c0e50a7b213a4d463eca4b6bf3f0e1a624fada1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=97ce2c57bf3c33d9cf9bde37ed7e5ffc49c48177


commit 97ce2c57bf3c33d9cf9bde37ed7e5ffc49c48177
Author: Bastiaan Jacques <address@hidden>
Date:   Wed Feb 23 00:35:53 2011 +0100

    Avoid using a temporary buffer that is not needed.

diff --git a/libmedia/AudioDecoderSimple.cpp b/libmedia/AudioDecoderSimple.cpp
index b88d9d7..16e109a 100644
--- a/libmedia/AudioDecoderSimple.cpp
+++ b/libmedia/AudioDecoderSimple.cpp
@@ -265,13 +265,10 @@ u8_expand(unsigned char * &data,
        const unsigned char* input,
        boost::uint32_t input_size) // This is also the number of u8bit samples
 {
-       boost::scoped_array<boost::uint8_t> in_data ( new 
boost::uint8_t[input_size] );
        boost::int16_t  *out_data = new boost::int16_t[input_size];
 
-       memcpy((char *)in_data.get(), input, input_size);
-
        // Convert 8-bit to 16
-       boost::uint8_t *inp = in_data.get();
+       const boost::uint8_t *inp = input;
        boost::int16_t *outp = out_data;
        for (unsigned int i = input_size; i>0; i--) {
                *outp++ = ((boost::int16_t)(*inp++) - 128) * 256;

-----------------------------------------------------------------------

Summary of changes:
 libmedia/AudioDecoderSimple.cpp |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]