Changeset 3923780814004f3735687c9963b753fd751b2245

Show
Ignore:
Timestamp:
12/09/06 21:15:20 (2 years ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1158088520 +0000
git-parent:

[39d0e3e076334dc371a62020fba4d30919148548]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1158088520 +0000
Message:

Most of demux/

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/asf/libasf.c

    r2d824ac r3923780  
    2323 *****************************************************************************/ 
    2424 
     25#include <vlc/vlc.h> 
     26 
     27#include <stdio.h> 
    2528#include <stdlib.h>                                      /* malloc(), free() */ 
    2629 
    27 #include <vlc/vlc.h> 
    2830#include <vlc/input.h> 
    2931 
  • modules/demux/mp4/libmp4.c

    r982c2c8 r3923780  
    2121 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 
    2222 *****************************************************************************/ 
     23#include <vlc/vlc.h> 
     24 
     25#include <stdio.h> 
    2326#include <stdlib.h>                                      /* malloc(), free() */ 
    2427 
    25 #include <vlc/vlc.h> 
    2628#include <vlc/input.h> 
    2729 
     
    11131115        /* SoundDescriptionV2 */ 
    11141116        double f_sample_rate; 
     1117    int64_t dummy; 
    11151118        uint32_t i_channel; 
    11161119 
    11171120        MP4_GET4BYTES( p_box->data.p_sample_soun->i_sample_per_packet ); 
    1118         MP4_GET8BYTES( (*(int64_t *)&f_sample_rate) ); 
     1121        MP4_GET8BYTES( dummy ); 
     1122    memcpy( &f_sample_rate, &dummy, 8 ); 
    11191123 
    11201124        msg_Dbg( p_stream, "read box: %f Hz", f_sample_rate ); 
  • modules/demux/mp4/mp4.c

    r2a7d4c7 r3923780  
    2424 * Preamble 
    2525 *****************************************************************************/ 
     26 
     27#include <vlc/vlc.h> 
     28 
     29#include <stdio.h> 
    2630#include <stdlib.h>                                      /* malloc(), free() */ 
    2731 
    28 #include <vlc/vlc.h> 
    2932#include <vlc/input.h> 
    3033#include <vlc_playlist.h> 
  • modules/demux/nsc.c

    r0ade81b r3923780  
    148148    size_t buf16_size; 
    149149    unsigned char *buf16; 
    150     char *p_buf16; 
     150    const char *p_buf16; 
    151151    size_t buf8_size; 
    152152    char *buf8; 
     
    209209 
    210210    buf16_size = length; 
    211     buf16 = (unsigned char *)malloc( buf16_size ); 
     211    buf16 = malloc( buf16_size ); 
    212212    if( buf16 == NULL ) 
    213213    { 
     
    221221        { 
    222222            msg_Err( p_demux, "load_byte failed" ); 
    223             free( (void *)buf16 ); 
     223            free( buf16 ); 
    224224            return NULL; 
    225225        } 
     
    227227 
    228228    buf8_size = length; 
    229     buf8 = (char *)malloc( buf8_size + 1 ); 
     229    buf8 = malloc( buf8_size + 1 ); 
    230230    if( buf8 == NULL ) 
    231231    { 
    232232        msg_Err( p_demux, "out of memory" ); 
    233         free( (void *)buf16 ); 
     233        free( buf16 ); 
    234234        return NULL; 
    235235    } 
     
    239239    { 
    240240        msg_Err( p_demux, "iconv_open failed" ); 
    241         free( (void *)buf16 ); 
    242         free( (void *)buf8 ); 
    243         return NULL; 
    244     } 
    245  
    246     p_buf8 = &buf8[ 0 ]
    247     p_buf16 = (char *)&buf16[ 0 ]
     241        free( buf16 ); 
     242        free( buf8 ); 
     243        return NULL; 
     244    } 
     245 
     246    p_buf8 = buf8
     247    p_buf16 = (const char *)buf16
    248248 
    249249    if( vlc_iconv( conv, &p_buf16, &buf16_size, &p_buf8, &buf8_size ) < 0 ) 
     
    259259    vlc_iconv_close( conv ); 
    260260 
    261     free( (void *)buf16 ); 
     261    free( buf16 ); 
    262262    return buf8; 
    263263} 
  • modules/demux/playlist/b4s.c

    r2d824ac r3923780  
    4646static int Demux( demux_t *p_demux); 
    4747static int Control( demux_t *p_demux, int i_query, va_list args ); 
    48 static char *GetNextToken(char *psz_cur_string); 
     48//static char *GetNextToken(char *psz_cur_string); 
    4949static int IsWhitespace( char *psz_string ); 
    5050 
     
    299299} 
    300300 
     301#if 0 
    301302/** 
    302303 * Get a in-string pointer to the start of the next token from a 
     
    319320    return psz_cur_string; 
    320321} 
     322#endif 
    321323 
    322324static int IsWhitespace( char *psz_string ) 
  • modules/demux/real.c

    r26f68e7 r3923780  
    2525 * Preamble 
    2626 *****************************************************************************/ 
     27#include <vlc/vlc.h> 
     28 
     29#include <stdio.h> 
    2730#include <stdlib.h>                                      /* malloc(), free() */ 
    2831 
    29 #include <vlc/vlc.h> 
    3032#include <vlc/input.h> 
    3133#include "charset.h" 
  • modules/demux/subtitle.c

    r16b2dec r3923780  
    2626 * Preamble 
    2727 *****************************************************************************/ 
     28#include <vlc/vlc.h> 
     29 
     30#include <string.h> 
    2831#include <stdlib.h> 
    2932 
     
    3437#include <ctype.h> 
    3538 
    36 #include <vlc/vlc.h> 
    3739#include <vlc/input.h> 
    3840#include "vlc_video.h" 
     41#include "charset.h" 
    3942 
    4043/***************************************************************************** 
  • modules/demux/ts.c

    rce24095 r3923780  
    2626 * Preamble 
    2727 *****************************************************************************/ 
     28 
     29#include <vlc/vlc.h> 
     30 
     31#include <stdio.h> 
    2832#include <stdlib.h>                                      /* malloc(), free() */ 
    2933#include <ctype.h> 
    3034 
    31 #include <vlc/vlc.h> 
    3235#include <vlc/input.h> 
    3336 
     
    24042407            if( p_dr->i_tag == 0x48 ) 
    24052408            { 
     2409#if 0 
    24062410                static const char *psz_type[0x11] = { 
    24072411                    "Reserved", 
     
    24232427                    "DVB MHP service" 
    24242428                }; 
     2429#endif 
    24252430                dvbpsi_service_dr_t *pD = dvbpsi_DecodeServiceDr( p_dr ); 
    24262431                char str1[257]; 
  • modules/demux/vobsub.c

    r0ade81b r3923780  
    2626 * Preamble 
    2727 *****************************************************************************/ 
     28#include <vlc/vlc.h> 
     29 
    2830#include <stdlib.h> 
     31#include <string.h> 
    2932#include <errno.h> 
    3033#include <sys/types.h> 
    3134 
    32 #include <vlc/vlc.h> 
    3335#include <vlc/input.h> 
    3436#include "vlc_video.h"