~siretart/vlc/debian-packaging

« back to all changes in this revision

Viewing changes to modules/demux/caf.c

  • Committer: Sebastian Ramacher
  • Date: 2016-01-31 20:58:37 UTC
  • mfrom: (1.2.39)
  • Revision ID: git-v1:b7ac1de93ecf7cd3d86898544433974ce0af7086
Merge tag 'upstream/2.2.2'

Upstream version 2.2.2

# gpg: Signature made Sun 31 Jan 2016 21:57:53 CET using RSA key ID 6EA71993
# gpg: Good signature from "Sebastian Ramacher <sebastian@ramacher.at>"
# gpg:                 aka "Sebastian Ramacher <s.ramacher@gmail.com>"
# gpg:                 aka "Sebastian Ramacher <s.ramacher@gmx.at>"
# gpg:                 aka "Sebastian Ramacher <s.ramacher@student.tugraz.at>"
# gpg:                 aka "Sebastian Ramacher <sramacher@debian.org>"
# gpg:                 aka "Sebastian Ramacher <sebastian.ramacher@iaik.tugraz.at>"

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * caf.c: Core Audio File Format demuxer
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2013 VLC authors and VideoLAN
5
 
 * $Id: 465caf66866235d960b99148701afbb605780d96 $
 
5
 * $Id: f5c63fc006b22651dcdfa6b8100377c63b625003 $
6
6
 *
7
7
 * Authors: Matthias Keiser <matthias@tristan-inc.com>
8
8
 *
277
277
    }
278
278
 
279
279
    const uint8_t *p_peek;
280
 
    uint32_t i_peek_len = stream_Peek( p_demux->s, &p_peek, 2 * 10 ); /* Peeking the maximum number of bytes that two 64 bit numbers could use (( 64 + 6 ) / 7 = 10 ). */
 
280
    int i_peek_len = stream_Peek( p_demux->s, &p_peek, 2 * 10 );
 
281
    /* Peeking the maximum number of bytes that two 64 bit numbers could use
 
282
     * (( 64 + 6 ) / 7 = 10). */
 
283
    if( i_peek_len < 0 )
 
284
        i_peek_len = 0;
281
285
 
282
286
    if( p_sys->fmt.audio.i_bytes_per_frame )
283
287
    {
302
306
    }
303
307
    else
304
308
    {
305
 
        if( i_desc_size >= i_peek_len )
 
309
        if( i_desc_size >= (unsigned)i_peek_len )
306
310
        {
307
311
            return VLC_EGENERIC;
308
312
        }