~ubuntu-branches/ubuntu/lucid/vlc/lucid

« back to all changes in this revision

Viewing changes to modules/codec/faad.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-11-12 15:29:11 UTC
  • mfrom: (3.5.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091112152911-skpz5ubpg18zjedp
Tags: 1.0.3-1ubuntu1
* Merge from Debian unstable (LP: #435524), remaining changes:
  - build against xulrunner-dev instead of iceape-dev
  - build against libx264-dev and install libx264 plugin
  - add Xb-Npp header to vlc package
  - recommend vlc-plugin-pulse for vlc
  - backport patch "402_increase_pulseaudio_score.diff"

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * decoder.c: AAC decoder using libfaad2
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2001, 2003 the VideoLAN team
5
 
 * $Id: e050a94bc0e15293f45ca1502f5998f249bd1437 $
 
5
 * $Id: ae446753da0db1a4346fa5aca8af277aff98edde $
6
6
 *
7
7
 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8
8
 *          Gildas Bazin <gbazin@videolan.org>
233
233
    /* Append the block to the temporary buffer */
234
234
    if( p_sys->i_buffer_size < p_sys->i_buffer + p_block->i_buffer )
235
235
    {
236
 
        p_sys->i_buffer_size = p_sys->i_buffer + p_block->i_buffer;
237
 
        p_sys->p_buffer = realloc( p_sys->p_buffer, p_sys->i_buffer_size );
 
236
        size_t  i_buffer_size = p_sys->i_buffer + p_block->i_buffer;
 
237
        uint8_t *p_buffer     = realloc( p_sys->p_buffer, i_buffer_size );
 
238
        if( p_buffer )
 
239
        {
 
240
            p_sys->i_buffer_size = i_buffer_size;
 
241
            p_sys->p_buffer      = p_buffer;
 
242
        }
 
243
        else
 
244
        {
 
245
            p_block->i_buffer = 0;
 
246
        }
238
247
    }
239
248
 
240
249
    if( p_block->i_buffer > 0 )