Ticket #458: diff_mplayer.2.diff

File diff_mplayer.2.diff, 165.3 KB (added by stranche@…, 20 years ago)

diff done with 'diff -Naur' and tested with 'patch -p0'

  • codec-cfg.c

    diff -Naur main2/codec-cfg.c main/codec-cfg.c
    old new  
    10261026                        for (j = 0; j < nr[i]; j++) {
    10271027                                printf("{");
    10281028
    1029                                 print_int_array(cod[i][j].fourcc, CODECS_MAX_FOURCC);
     1029                                print_int_array((signed int*)(cod[i][j].fourcc), CODECS_MAX_FOURCC);
    10301030                                printf(", /* fourcc */\n");
    10311031                               
    1032                                 print_int_array(cod[i][j].fourccmap, CODECS_MAX_FOURCC);
     1032                                print_int_array((signed int*)(cod[i][j].fourccmap), CODECS_MAX_FOURCC);
    10331033                                printf(", /* fourccmap */\n");
    10341034                               
    1035                                 print_int_array(cod[i][j].outfmt, CODECS_MAX_OUTFMT);
     1035                                print_int_array((signed int*)(cod[i][j].outfmt), CODECS_MAX_OUTFMT);
    10361036                                printf(", /* outfmt */\n");
    10371037                               
    1038                                 print_char_array(cod[i][j].outflags, CODECS_MAX_OUTFMT);
     1038                                print_char_array((unsigned char*)(cod[i][j].outflags), CODECS_MAX_OUTFMT);
    10391039                                printf(", /* outflags */\n");
    10401040                               
    1041                                 print_int_array(cod[i][j].infmt, CODECS_MAX_INFMT);
     1041                                print_int_array((signed int*)(cod[i][j].infmt), CODECS_MAX_INFMT);
    10421042                                printf(", /* infmt */\n");
    10431043                               
    10441044                                print_char_array(cod[i][j].inflags, CODECS_MAX_INFMT);
  • libao2/ao_alsa.c

    diff -Naur main2/libao2/ao_alsa.c main/libao2/ao_alsa.c
    old new  
    507507        }
    508508
    509509      if ((err = snd_pcm_hw_params_set_channels_near(alsa_handler, alsa_hwparams,
    510                                                      &ao_data.channels)) < 0)
     510                                                     (unsigned int *)&ao_data.channels)) < 0)
    511511        {
    512512          mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set channels: %s\n",
    513513                 snd_strerror(err));
     
    515515        }
    516516
    517517      if ((err = snd_pcm_hw_params_set_rate_near(alsa_handler, alsa_hwparams,
    518                                                  &ao_data.samplerate, NULL)) < 0)
     518                                                 (unsigned int *)&ao_data.samplerate, NULL)) < 0)
    519519        {
    520520          mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set samplerate-2: %s\n",
    521521                 snd_strerror(err));
     
    565565          mp_msg(MSGT_AO,MSGL_V,"alsa-init: chunksize set to %li\n", chunk_size);
    566566        }
    567567        if ((err = snd_pcm_hw_params_set_periods_near(alsa_handler, alsa_hwparams,
    568                                                       &alsa_fragcount, NULL)) < 0) {
     568                                                      (unsigned int *)&alsa_fragcount, NULL)) < 0) {
    569569          mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set periods: %s\n",
    570570                 snd_strerror(err));
    571571        }
  • libavcodec/4xm.c

    diff -Naur main2/libavcodec/4xm.c main/libavcodec/4xm.c
    old new  
    633633        }
    634634        cfrm= &f->cfrm[i];
    635635
    636         cfrm->data= av_fast_realloc(cfrm->data, &cfrm->allocated_size, cfrm->size + data_size + FF_INPUT_BUFFER_PADDING_SIZE);
     636        cfrm->data= av_fast_realloc(cfrm->data, (unsigned int *)&cfrm->allocated_size, cfrm->size + data_size + FF_INPUT_BUFFER_PADDING_SIZE);
    637637
    638638        memcpy(cfrm->data + cfrm->size, buf+20, data_size);
    639639        cfrm->size += data_size;
  • libavcodec/cyuv.c

    diff -Naur main2/libavcodec/cyuv.c main/libavcodec/cyuv.c
    old new  
    4141
    4242typedef struct CyuvDecodeContext {
    4343    AVCodecContext *avctx;
    44     int width, height;
     44    unsigned int width, height;
    4545    AVFrame frame;
    4646} CyuvDecodeContext;
    4747
     
    7575    int v_ptr;
    7676
    7777    /* prediction error tables (make it clear that they are signed values) */
    78     signed char *y_table = buf +  0;
    79     signed char *u_table = buf + 16;
    80     signed char *v_table = buf + 32;
     78    unsigned char *y_table = buf +  0;
     79    unsigned char *u_table = buf + 16;
     80    unsigned char *v_table = buf + 32;
    8181
    8282    unsigned char y_pred, u_pred, v_pred;
    8383    int stream_ptr;
  • libavcodec/h263.c

    diff -Naur main2/libavcodec/h263.c main/libavcodec/h263.c
    old new  
    23722372    put_bits(&s->pb, 1, s->mpeg_quant); /* quant type= (0=h263 style)*/
    23732373
    23742374    if(s->mpeg_quant){
    2375         ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);
    2376         ff_write_quant_matrix(&s->pb, s->avctx->inter_matrix);
     2375        ff_write_quant_matrix(&s->pb, (int16_t *)(s->avctx->intra_matrix));
     2376        ff_write_quant_matrix(&s->pb, (int16_t *)(s->avctx->inter_matrix));
    23772377    }
    23782378
    23792379    if (vo_ver_id != 1)
  • libavcodec/h264.c

    diff -Naur main2/libavcodec/h264.c main/libavcodec/h264.c
    old new  
    70167016    }
    70177017
    70187018    user_data[i]= 0;
    7019     e= sscanf(user_data+16, "x264 - core %d"/*%s - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html*/, &build);
     7019    e= sscanf((char*)user_data+16, "x264 - core %d"/*%s - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html*/, &build);
    70207020    if(e==1 && build>=0)
    70217021        h->x264_build= build;
    70227022
  • libavcodec/mjpeg.c

    diff -Naur main2/libavcodec/mjpeg.c main/libavcodec/mjpeg.c
    old new  
    17981798                av_log(s->avctx, AV_LOG_INFO, "mjpeg comment: '%s'\n", cbuf);
    17991799
    18001800            /* buggy avid, it puts EOI only at every 10th frame */
    1801             if (!strcmp(cbuf, "AVID"))
     1801            if (!strcmp((char *)cbuf, "AVID"))
    18021802            {
    18031803                s->buggy_avid = 1;
    18041804                //        if (s->first_picture)
    18051805                //            printf("mjpeg: workarounding buggy AVID\n");
    18061806            }
    1807             else if(!strcmp(cbuf, "CS=ITU601")){
     1807            else if(!strcmp((char *)cbuf, "CS=ITU601")){
    18081808                s->cs_itu601= 1;
    18091809            }
    18101810
  • libavcodec/mpeg12.c

    diff -Naur main2/libavcodec/mpeg12.c main/libavcodec/mpeg12.c
    old new  
    314314
    315315            put_bits(&s->pb, 1, constraint_parameter_flag);
    316316
    317             ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);
    318             ff_write_quant_matrix(&s->pb, s->avctx->inter_matrix);
     317            ff_write_quant_matrix(&s->pb, (int16_t*)(s->avctx->intra_matrix));
     318            ff_write_quant_matrix(&s->pb, (int16_t*)(s->avctx->inter_matrix));
    319319
    320320            if(s->codec_id == CODEC_ID_MPEG2VIDEO){
    321321                put_header(s, EXT_START_CODE);
     
    26892689            return 0;
    26902690
    26912691        start_code= -1;
    2692         buf = ff_find_start_code(buf, s->gb.buffer_end, &start_code);
     2692        buf = ff_find_start_code(buf, s->gb.buffer_end, (uint32_t *)&start_code);
    26932693        mb_y= start_code - SLICE_MIN_START_CODE;
    26942694        if(mb_y < 0 || mb_y >= s->end_mb_y)
    26952695            return -1;
     
    30563056    for(;;) {
    30573057        /* find start next code */
    30583058        start_code = -1;
    3059         buf_ptr = ff_find_start_code(buf_ptr,buf_end, &start_code);
     3059        buf_ptr = ff_find_start_code(buf_ptr,buf_end, (uint32_t*)&start_code);
    30603060        if (start_code < 0){
    30613061            if(s2->pict_type != B_TYPE || avctx->skip_frame <= AVDISCARD_DEFAULT){
    30623062                if(avctx->thread_count > 1){
  • libavcodec/mpegaudiodec.c

    diff -Naur main2/libavcodec/mpegaudiodec.c main/libavcodec/mpegaudiodec.c
    old new  
    24402440        samples_ptr = samples + ch;
    24412441        for(i=0;i<nb_frames;i++) {
    24422442            ff_mpa_synth_filter(s->synth_buf[ch], &(s->synth_buf_offset[ch]),
    2443                          window, &s->dither_state,
     2443                         window, (int *)&s->dither_state,
    24442444                         samples_ptr, s->nb_channels,
    24452445                         s->sb_samples[ch][i]);
    24462446            samples_ptr += 32 * s->nb_channels;
  • libavcodec/mpegvideo.c

    diff -Naur main2/libavcodec/mpegvideo.c main/libavcodec/mpegvideo.c
    old new  
    22302230        input[i].linesize[2]= c->width/2;
    22312231
    22322232        if(!i || s->input_picture[i-1])
    2233             img_resample(resample, &input[i], &pre_input);
     2233            img_resample(resample, (int *)&input[i], (int *)&pre_input);
    22342234    }
    22352235
    22362236    for(j=0; j<s->max_b_frames+1; j++){
  • libavcodec/parser.c

    diff -Naur main2/libavcodec/parser.c main/libavcodec/parser.c
    old new  
    314314    buf_end = buf + buf_size;
    315315    while (buf < buf_end) {
    316316        start_code= -1;
    317         buf= ff_find_start_code(buf, buf_end, &start_code);
     317        buf= ff_find_start_code(buf, buf_end, (uint32_t *)&start_code);
    318318        bytes_left = buf_end - buf;
    319319        switch(start_code) {
    320320        case PICTURE_START_CODE:
  • libavcodec/pnm.c

    diff -Naur main2/libavcodec/pnm.c main/libavcodec/pnm.c
    old new  
    302302    default:
    303303        return -1;
    304304    }
    305     snprintf(s->bytestream, s->bytestream_end - s->bytestream,
     305    snprintf((char *)s->bytestream, s->bytestream_end - s->bytestream,
    306306             "P%c\n%d %d\n",
    307307             c, avctx->width, h1);
    308     s->bytestream += strlen(s->bytestream);
     308    s->bytestream += strlen((char *)s->bytestream);
    309309    if (avctx->pix_fmt != PIX_FMT_MONOWHITE) {
    310         snprintf(s->bytestream, s->bytestream_end - s->bytestream,
     310        snprintf((char *)s->bytestream, s->bytestream_end - s->bytestream,
    311311                 "%d\n", 255);
    312         s->bytestream += strlen(s->bytestream);
     312        s->bytestream += strlen((char *)s->bytestream);
    313313    }
    314314
    315315    ptr = p->data[0];
     
    388388    default:
    389389        return -1;
    390390    }
    391     snprintf(s->bytestream, s->bytestream_end - s->bytestream,
     391    snprintf((char *)s->bytestream, s->bytestream_end - s->bytestream,
    392392             "P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\nTUPLETYPE %s\nENDHDR\n",
    393393             w, h, depth, maxval, tuple_type);
    394     s->bytestream += strlen(s->bytestream);
     394    s->bytestream += strlen((char *)s->bytestream);
    395395
    396396    ptr = p->data[0];
    397397    linesize = p->linesize[0];
  • libavcodec/ra144.c

    diff -Naur main2/libavcodec/ra144.c main/libavcodec/ra144.c
    old new  
    141141  b=*(glob->iptr++);
    142142  c=*(glob->iptr++);
    143143  d=*(glob->iptr++);
    144   if (a) rotate_block(glob->buffer_2,glob->buffer_a,a);
     144  if (a) rotate_block((short *)glob->buffer_2,(short *)glob->buffer_a,a);
    145145  memcpy(glob->buffer_b,etable1+b*BLOCKSIZE,BLOCKSIZE*2);
    146146  e=((ftable1[b]>>4)*glob->gval)>>8;
    147147  memcpy(glob->buffer_c,etable2+c*BLOCKSIZE,BLOCKSIZE*2);
    148148  f=((ftable2[c]>>4)*glob->gval)>>8;
    149   if (a) g=irms(glob->buffer_a,glob->gval)>>12;
     149  if (a) g=irms((short *)glob->buffer_a,glob->gval)>>12;
    150150  else g=0;
    151   add_wav(glob,d,a,g,e,f,glob->buffer_a,glob->buffer_b,glob->buffer_c,glob->buffer_d);
     151  add_wav(glob,d,a,g,e,f,(short *)glob->buffer_a,(short *)glob->buffer_b,(short *)glob->buffer_c,(short *)glob->buffer_d);
    152152  memmove(glob->buffer_2,glob->buffer_2+BLOCKSIZE,(BUFFERSIZE-BLOCKSIZE)*2);
    153153  memcpy(glob->buffer_2+BUFFERSIZE-BLOCKSIZE,glob->buffer_d,BLOCKSIZE*2);
    154   final(glob,glob->gsp,glob->buffer_d,glob->output_buffer,glob->buffer,BLOCKSIZE);
     154  final(glob,(short *)glob->gsp,(short *)glob->buffer_d,glob->output_buffer,(int *)glob->buffer,BLOCKSIZE);
    155155}
    156156
    157157/* rotate block */
     
    450450  while (lptr<glob->swapbuf1+10)
    451451    *(lptr++)=(*(dptr++))[(*(glob->iptr++))<<1];
    452452
    453   do_voice(glob->swapbuf1,glob->swapbuf2);
     453  do_voice((int *)glob->swapbuf1,(int *)glob->swapbuf2);
    454454
    455455  a=t_sqrt(glob->val*glob->oldval)>>12;
    456456
    457457  for (c=0;c<NBLOCKS;c++) {
    458458    if (c==(NBLOCKS-1)) {
    459       dec1(glob,glob->swapbuf1,glob->swapbuf2,3,glob->val);
     459      dec1(glob,(int *)glob->swapbuf1,(int *)glob->swapbuf2,3,glob->val);
    460460    } else {
    461461      if (c*2==(NBLOCKS-2)) {
    462462        if (glob->oldval<glob->val) {
    463           dec2(glob,glob->swapbuf1,glob->swapbuf2,3,a,glob->swapbuf2alt,c);
     463          dec2(glob,(int *)glob->swapbuf1,(int *)glob->swapbuf2,3,a,(int *)glob->swapbuf2alt,c);
    464464        } else {
    465           dec2(glob,glob->swapbuf1alt,glob->swapbuf2alt,3,a,glob->swapbuf2,c);
     465          dec2(glob,(int *)glob->swapbuf1alt,(int *)glob->swapbuf2alt,3,a,(int *)glob->swapbuf2,c);
    466466        }
    467467      } else {
    468468        if (c*2<(NBLOCKS-2)) {
    469           dec2(glob,glob->swapbuf1alt,glob->swapbuf2alt,3,glob->oldval,glob->swapbuf2,c);
     469          dec2(glob,(int *)glob->swapbuf1alt,(int *)glob->swapbuf2alt,3,glob->oldval,(int *)glob->swapbuf2,c);
    470470        } else {
    471           dec2(glob,glob->swapbuf1,glob->swapbuf2,3,glob->val,glob->swapbuf2alt,c);
     471          dec2(glob,(int *)glob->swapbuf1,(int *)glob->swapbuf2,3,glob->val,(int *)glob->swapbuf2alt,c);
    472472        }
    473473      }
    474474    }
  • libavcodec/svq1.c

    diff -Naur main2/libavcodec/svq1.c main/libavcodec/svq1.c
    old new  
    657657    if ((s->f_code ^ 0x10) >= 0x50) {
    658658      char msg[256];
    659659
    660       svq1_parse_string (bitbuf, (char *) msg);
     660      svq1_parse_string (bitbuf, (unsigned char *) msg);
    661661
    662662      av_log(s->avctx, AV_LOG_INFO, "embedded message: \"%s\"\n", (char *) msg);
    663663    }
  • libavcodec/x264.c

    diff -Naur main2/libavcodec/x264.c main/libavcodec/x264.c
    old new  
    222222    x4->params.analyse.b_fast_pskip = (avctx->flags2 & CODEC_FLAG2_FASTPSKIP);
    223223
    224224    x4->params.analyse.i_trellis = avctx->trellis;
    225     x4->params.analyse.i_noise_reduction = avctx->noise_reduction;
    226225
    227226    if(avctx->level > 0) x4->params.i_level_idc = avctx->level;
    228227
  • libavformat/avienc.c

    diff -Naur main2/libavformat/avienc.c main/libavformat/avienc.c
    old new  
    476476            put_byte(pb, 0);        /* bIndexSubType (0 == frame index) */
    477477            put_byte(pb, 0);        /* bIndexType (0 == AVI_INDEX_OF_INDEXES) */
    478478            put_le32(pb, 0);        /* nEntriesInUse (will fill out later on) */
    479             put_tag(pb, avi_stream2fourcc(&tag[0], i, stream->codec_type));
     479            put_tag(pb, (char *)avi_stream2fourcc(&tag[0], i, stream->codec_type));
    480480                                    /* dwChunkId */
    481481            put_le64(pb, 0);        /* dwReserved[3]
    482482            put_le32(pb, 0);           Must be 0.    */
     
    531531
    532532         /* Writing AVI OpenDML leaf index chunk */
    533533         ix = url_ftell(pb);
    534          put_tag(pb, &ix_tag[0]);     /* ix?? */
     534         put_tag(pb, (char *)&ix_tag[0]);     /* ix?? */
    535535         put_le32(pb, avi->indexes[i].entry * 8 + 24);
    536536                                      /* chunk size */
    537537         put_le16(pb, 2);             /* wLongsPerEntry */
     
    539539         put_byte(pb, 1);             /* bIndexType (1 == AVI_INDEX_OF_CHUNKS) */
    540540         put_le32(pb, avi->indexes[i].entry);
    541541                                      /* nEntriesInUse */
    542          put_tag(pb, &tag[0]);        /* dwChunkId */
     542         put_tag(pb, (char *)&tag[0]);        /* dwChunkId */
    543543         put_le64(pb, avi->movi_list);/* qwBaseOffset */
    544544         put_le32(pb, 0);             /* dwReserved_3 (must be 0) */
    545545
     
    599599            if (!empty) {
    600600                avi_stream2fourcc(&tag[0], stream_id,
    601601                                  s->streams[stream_id]->codec->codec_type);
    602                 put_tag(pb, &tag[0]);
     602                put_tag(pb, (char *)&tag[0]);
    603603                put_le32(pb, ie->flags);
    604604                put_le32(pb, ie->pos);
    605605                put_le32(pb, ie->len);
  • libavformat/aviobuf.c

    diff -Naur main2/libavformat/aviobuf.c main/libavformat/aviobuf.c
    old new  
    586586    va_start(ap, fmt);
    587587    ret = vsnprintf(buf, sizeof(buf), fmt, ap);
    588588    va_end(ap);
    589     put_buffer(s, buf, strlen(buf));
     589    put_buffer(s, (unsigned char *)buf, strlen(buf));
    590590    return ret;
    591591}
    592592#endif //CONFIG_MUXERS
  • libavformat/crc.c

    diff -Naur main2/libavformat/crc.c main/libavformat/crc.c
    old new  
    8585    char buf[64];
    8686
    8787    snprintf(buf, sizeof(buf), "CRC=0x%08x\n", crc->crcval);
    88     put_buffer(&s->pb, buf, strlen(buf));
     88    put_buffer(&s->pb, (unsigned char *)buf, strlen(buf));
    8989    put_flush_packet(&s->pb);
    9090    return 0;
    9191}
     
    9696    char buf[256];
    9797
    9898    snprintf(buf, sizeof(buf), "%d, %"PRId64", %d, 0x%08x\n", pkt->stream_index, pkt->dts, pkt->size, crc);
    99     put_buffer(&s->pb, buf, strlen(buf));
     99    put_buffer(&s->pb, (unsigned char *)buf, strlen(buf));
    100100    put_flush_packet(&s->pb);
    101101    return 0;
    102102}
  • libavformat/flvdec.c

    diff -Naur main2/libavformat/flvdec.c main/libavformat/flvdec.c
    old new  
    8787            len= get_be16(&s->pb);
    8888            if(len >= sizeof(tmp) || !len)
    8989                break;
    90             get_buffer(&s->pb, tmp, len);
     90            get_buffer(&s->pb, (unsigned char *)tmp, len);
    9191            tmp[len]=0;
    9292
    9393            type= get_byte(&s->pb);
  • libavformat/ipmovie.c

    diff -Naur main2/libavformat/ipmovie.c main/libavformat/ipmovie.c
    old new  
    507507{
    508508    if (p->buf_size < IPMOVIE_SIGNATURE_SIZE)
    509509        return 0;
    510     if (strncmp(p->buf, IPMOVIE_SIGNATURE, IPMOVIE_SIGNATURE_SIZE) != 0)
     510    if (strncmp((char *)p->buf, IPMOVIE_SIGNATURE, IPMOVIE_SIGNATURE_SIZE) != 0)
    511511        return 0;
    512512
    513513    return AVPROBE_SCORE_MAX;
  • libavformat/matroska.c

    diff -Naur main2/libavformat/matroska.c main/libavformat/matroska.c
    old new  
    16561656                        case MATROSKA_ID_CUETIME: {
    16571657                            int64_t time;
    16581658                            if ((res = ebml_read_uint(matroska, &id,
    1659                                                       &time)) < 0)
     1659                                                      (uint64_t *)&time)) < 0)
    16601660                                break;
    16611661                            idx.time = time * matroska->time_scale;
    16621662                            break;
  • libavformat/mmf.c

    diff -Naur main2/libavformat/mmf.c main/libavformat/mmf.c
    old new  
    5959    MMFContext *mmf = s->priv_data;
    6060    ByteIOContext *pb = &s->pb;
    6161    offset_t pos;
    62     int rate;
     62    unsigned int rate;
    6363
    6464    rate = mmf_rate_code(s->streams[0]->codec->sample_rate);
    6565    if(rate < 0) {
     
    7878    put_tag(pb, "VN:libavcodec,"); /* metadata ("ST:songtitle,VN:version,...") */
    7979    end_tag_be(pb, pos);
    8080
    81     put_buffer(pb, "ATR\x00", 4);
     81    put_buffer(pb, (unsigned char*)"ATR\x00", 4);
    8282    put_be32(pb, 0);
    8383    mmf->atrpos = url_ftell(pb);
    8484    put_byte(pb, 0); /* format type */
     
    9292    put_be32(pb, 16);
    9393    mmf->atsqpos = url_ftell(pb);
    9494    /* Will be filled on close */
    95     put_buffer(pb, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16);
     95    put_buffer(pb, (unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16);
    9696
    9797    mmf->awapos = start_tag(pb, "Awa\x01");
    9898
     
    149149
    150150        /* "nop" */
    151151        put_varlength(pb, gatetime); /* start time */
    152         put_buffer(pb, "\xff\x00", 2); /* nop */
     152        put_buffer(pb, (unsigned char*)"\xff\x00", 2); /* nop */
    153153
    154154        /* "end of sequence" */
    155         put_buffer(pb, "\x00\x00\x00\x00", 4);
     155        put_buffer(pb, (unsigned char*)"\x00\x00\x00\x00", 4);
    156156
    157157        url_fseek(pb, pos, SEEK_SET);
    158158
  • libavformat/movenc.c

    diff -Naur main2/libavformat/movenc.c main/libavformat/movenc.c
    old new  
    514514    if (track->enc->codec && track->enc->codec->name)
    515515        strncpy(compressor_name,track->enc->codec->name,31);
    516516    put_byte(pb, strlen(compressor_name));
    517     put_buffer(pb, compressor_name, 31);
     517    put_buffer(pb, (unsigned char *)compressor_name, 31);
    518518
    519519    put_be16(pb, 0x18); /* Reserved */
    520520    put_be16(pb, 0xffff); /* Reserved */
     
    637637    put_be32(pb, 0); /* size */
    638638    put_tag(pb, "hdlr");
    639639    put_be32(pb, 0); /* Version & flags */
    640     put_buffer(pb, hdlr, 4); /* handler */
     640    put_buffer(pb, (unsigned char *)hdlr, 4); /* handler */
    641641    put_tag(pb, hdlr_type); /* handler type */
    642642    put_be32(pb ,0); /* reserved */
    643643    put_be32(pb ,0); /* reserved */
    644644    put_be32(pb ,0); /* reserved */
    645645    put_byte(pb, strlen(descr)); /* string counter */
    646     put_buffer(pb, descr, strlen(descr)); /* handler description */
     646    put_buffer(pb, (unsigned char *)descr, strlen(descr)); /* handler description */
    647647    return updateSize(pb, pos);
    648648}
    649649
     
    874874    put_tag(pb, "data");
    875875    put_be32(pb, 1);
    876876    put_be32(pb, 0);
    877     put_buffer(pb, data, strlen(data));
     877    put_buffer(pb, (unsigned char *)data, strlen(data));
    878878    return updateSize(pb, pos);
    879879}
    880880
     
    10841084            put_tag(pb, "\251req");
    10851085            put_be16(pb, sizeof("QuickTime 6.0 or greater") - 1);
    10861086            put_be16(pb, 0);
    1087             put_buffer(pb, "QuickTime 6.0 or greater",
     1087            put_buffer(pb, (unsigned char *)"QuickTime 6.0 or greater",
    10881088                       sizeof("QuickTime 6.0 or greater") - 1);
    10891089            updateSize(pb, pos);
    10901090            break;
     
    10991099        put_tag(pb, "\251enc");
    11001100        put_be16(pb, sizeof(LIBAVFORMAT_IDENT) - 1); /* string length */
    11011101        put_be16(pb, 0);
    1102         put_buffer(pb, LIBAVFORMAT_IDENT, sizeof(LIBAVFORMAT_IDENT) - 1);
     1102        put_buffer(pb, (unsigned char *)LIBAVFORMAT_IDENT, sizeof(LIBAVFORMAT_IDENT) - 1);
    11031103        updateSize(pb, pos);
    11041104    }
    11051105
     
    11101110        put_tag(pb, "\251nam");
    11111111        put_be16(pb, strlen(s->title)); /* string length */
    11121112        put_be16(pb, 0);
    1113         put_buffer(pb, s->title, strlen(s->title));
     1113        put_buffer(pb, (unsigned char *)s->title, strlen(s->title));
    11141114        updateSize(pb, pos);
    11151115    }
    11161116
     
    11211121        put_tag(pb, /*"\251aut"*/ "\251day" );
    11221122        put_be16(pb, strlen(s->author)); /* string length */
    11231123        put_be16(pb, 0);
    1124         put_buffer(pb, s->author, strlen(s->author));
     1124        put_buffer(pb, (unsigned char *)s->author, strlen(s->author));
    11251125        updateSize(pb, pos);
    11261126    }
    11271127
     
    11321132        put_tag(pb, "\251des");
    11331133        put_be16(pb, strlen(s->comment)); /* string length */
    11341134        put_be16(pb, 0);
    1135         put_buffer(pb, s->comment, strlen(s->comment));
     1135        put_buffer(pb, (unsigned char *)s->comment, strlen(s->comment));
    11361136        updateSize(pb, pos);
    11371137    }
    11381138
  • libavformat/mp3.c

    diff -Naur main2/libavformat/mp3.c main/libavformat/mp3.c
    old new  
    216216    buf[0] = 'T';
    217217    buf[1] = 'A';
    218218    buf[2] = 'G';
    219     strncpy(buf + 3, s->title, 30);
    220     strncpy(buf + 33, s->author, 30);
    221     strncpy(buf + 63, s->album, 30);
     219    strncpy((char *)buf + 3, s->title, 30);
     220    strncpy((char *)buf + 33, s->author, 30);
     221    strncpy((char *)buf + 63, s->album, 30);
    222222    v = s->year;
    223223    if (v > 0) {
    224224        for(i = 0;i < 4; i++) {
     
    226226            v = v / 10;
    227227        }
    228228    }
    229     strncpy(buf + 97, s->comment, 30);
     229    strncpy((char *)buf + 97, s->comment, 30);
    230230    if (s->track != 0) {
    231231        buf[125] = 0;
    232232        buf[126] = s->track;
  • libavformat/mpeg.c

    diff -Naur main2/libavformat/mpeg.c main/libavformat/mpeg.c
    old new  
    14281428        /* next start code (should be immediately after) */
    14291429        m->header_state = 0xff;
    14301430        size = MAX_SYNC_SIZE;
    1431         startcode = find_next_start_code(&s->pb, &size, &m->header_state);
     1431        startcode = find_next_start_code(&s->pb, &size, (uint32_t *)(&m->header_state));
    14321432    //printf("startcode=%x pos=0x%Lx\n", startcode, url_ftell(&s->pb));
    14331433    if (startcode < 0)
    14341434        return AVERROR_IO;
  • libavformat/mpjpeg.c

    diff -Naur main2/libavformat/mpjpeg.c main/libavformat/mpjpeg.c
    old new  
    2727{
    2828    uint8_t buf1[256];
    2929
    30     snprintf(buf1, sizeof(buf1), "--%s\n", BOUNDARY_TAG);
    31     put_buffer(&s->pb, buf1, strlen(buf1));
     30    snprintf((char *)buf1, sizeof(buf1), "--%s\n", BOUNDARY_TAG);
     31    put_buffer(&s->pb, buf1, strlen((char *)buf1));
    3232    put_flush_packet(&s->pb);
    3333    return 0;
    3434}
     
    3737{
    3838    uint8_t buf1[256];
    3939
    40     snprintf(buf1, sizeof(buf1), "Content-type: image/jpeg\n\n");
    41     put_buffer(&s->pb, buf1, strlen(buf1));
     40    snprintf((char *)buf1, sizeof(buf1), "Content-type: image/jpeg\n\n");
     41    put_buffer(&s->pb, buf1, strlen((char *)buf1));
    4242    put_buffer(&s->pb, pkt->data, pkt->size);
    4343
    44     snprintf(buf1, sizeof(buf1), "\n--%s\n", BOUNDARY_TAG);
    45     put_buffer(&s->pb, buf1, strlen(buf1));
     44    snprintf((char *)buf1, sizeof(buf1), "\n--%s\n", BOUNDARY_TAG);
     45    put_buffer(&s->pb, buf1, strlen((char *)buf1));
    4646    put_flush_packet(&s->pb);
    4747    return 0;
    4848}
  • libavformat/nsvdec.c

    diff -Naur main2/libavformat/nsvdec.c main/libavformat/nsvdec.c
    old new  
    322322
    323323        p = strings = av_mallocz(strings_size + 1);
    324324        endp = strings + strings_size;
    325         get_buffer(pb, strings, strings_size);
     325        get_buffer(pb, (unsigned char *)strings, strings_size);
    326326        while (p < endp) {
    327327            while (*p == ' ')
    328328                p++; /* strip out spaces */
  • libavformat/nut.c

    diff -Naur main2/libavformat/nut.c main/libavformat/nut.c
    old new  
    260260    unsigned int len= get_v(bc);
    261261
    262262    if(len && maxlen)
    263         get_buffer(bc, string, FFMIN(len, maxlen));
     263        get_buffer(bc, (unsigned char*)string, FFMIN(len, maxlen));
    264264    while(len > maxlen){
    265265        get_byte(bc);
    266266        len--;
     
    424424    int len= strlen(string);
    425425
    426426    put_v(bc, len);
    427     put_buffer(bc, string, len);
     427    put_buffer(bc, (unsigned char*)string, len);
    428428}
    429429
    430430static void put_s(ByteIOContext *bc, int64_t val){
     
    525525        av_mallocz(sizeof(StreamContext)*s->nb_streams);
    526526
    527527
    528     put_buffer(bc, ID_STRING, strlen(ID_STRING));
     528    put_buffer(bc, (unsigned char*)ID_STRING, strlen(ID_STRING));
    529529    put_byte(bc, 0);
    530530    nut->packet_start[2]= url_ftell(bc);
    531531
  • libavformat/ogg2.c

    diff -Naur main2/libavformat/ogg2.c main/libavformat/ogg2.c
    old new  
    220220    char sync[4];
    221221    int sp = 0;
    222222
    223     if (get_buffer (bc, sync, 4) < 4)
     223    if (get_buffer (bc, (unsigned char *)sync, 4) < 4)
    224224        return -1;
    225225
    226226    do{
  • libavformat/oggparseflac.c

    diff -Naur main2/libavformat/oggparseflac.c main/libavformat/oggparseflac.c
    old new  
    6464                FLAC_STREAMINFO_SIZE);
    6565        st->codec->extradata_size = FLAC_STREAMINFO_SIZE;
    6666    } else if (mdt == 4) {
    67         vorbis_comment (s, os->buf + os->pstart + 4, os->psize - 4);
     67        vorbis_comment (s, (char *)(os->buf + os->pstart + 4), (int)((unsigned *)os->psize - 4));
    6868    }
    6969
    7070    return 1;
    7171}
    7272
    7373ogg_codec_t flac_codec = {
    74     .magic = "\177FLAC",
     74    .magic = (unsigned char*)"\177FLAC",
    7575    .magicsize = 5,
    7676    .header = flac_header
    7777};
  • libavformat/oggparsetheora.c

    diff -Naur main2/libavformat/oggparsetheora.c main/libavformat/oggparsetheora.c
    old new  
    8080        st->codec->codec_id = CODEC_ID_THEORA;
    8181
    8282    } else if (os->buf[os->pstart] == 0x83) {
    83         vorbis_comment (s, os->buf + os->pstart + 7, os->psize - 8);
     83        vorbis_comment (s, (char *)os->buf + os->pstart + 7, os->psize - 8);
    8484    }
    8585
    8686    st->codec->extradata = av_realloc (st->codec->extradata, cds);
  • libavformat/oggparsevorbis.c

    diff -Naur main2/libavformat/oggparsevorbis.c main/libavformat/oggparsevorbis.c
    old new  
    187187        st->codec->codec_id = CODEC_ID_VORBIS;
    188188
    189189    } else if (os->buf[os->pstart] == 3) {
    190         vorbis_comment (s, os->buf + os->pstart + 7, os->psize - 8);
     190        vorbis_comment (s, (char *)os->buf + os->pstart + 7, os->psize - 8);
    191191    } else {
    192192        st->codec->extradata_size =
    193193            fixup_vorbis_headers(s, priv, &st->codec->extradata);
     
    197197}
    198198
    199199ogg_codec_t vorbis_codec = {
    200     .magic = "\001vorbis",
     200    .magic = (unsigned char *)"\001vorbis",
    201201    .magicsize = 7,
    202202    .header = vorbis_header
    203203};
  • libavformat/pnm.c

    diff -Naur main2/libavformat/pnm.c main/libavformat/pnm.c
    old new  
    189189    snprintf(buf, sizeof(buf),
    190190             "P%c\n%d %d\n",
    191191             c, info->width, h1);
    192     put_buffer(pb, buf, strlen(buf));
     192    put_buffer(pb, (unsigned char *)buf, strlen(buf));
    193193    if (info->pix_fmt != PIX_FMT_MONOWHITE) {
    194194        snprintf(buf, sizeof(buf),
    195195                 "%d\n", 255);
    196         put_buffer(pb, buf, strlen(buf));
     196        put_buffer(pb, (unsigned char *)buf, strlen(buf));
    197197    }
    198198
    199199    ptr = info->pict.data[0];
     
    359359    snprintf(buf, sizeof(buf),
    360360             "P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\nTUPLETYPE %s\nENDHDR\n",
    361361             w, h, depth, maxval, tuple_type);
    362     put_buffer(pb, buf, strlen(buf));
     362    put_buffer(pb, (unsigned char *)buf, strlen(buf));
    363363
    364364    ptr = info->pict.data[0];
    365365    linesize = info->pict.linesize[0];
     
    390390
    391391static int pnm_probe(AVProbeData *pd)
    392392{
    393     const char *p = pd->buf;
     393    const unsigned char *p = pd->buf;
    394394    if (pd->buf_size >= 8 &&
    395395        p[0] == 'P' &&
    396396        p[1] >= '4' && p[1] <= '6' &&
     
    410410
    411411static int pam_probe(AVProbeData *pd)
    412412{
    413     const char *p = pd->buf;
     413    const unsigned char *p = pd->buf;
    414414    if (pd->buf_size >= 8 &&
    415415        p[0] == 'P' &&
    416416        p[1] == '7' &&
  • libavformat/sgi.c

    diff -Naur main2/libavformat/sgi.c main/libavformat/sgi.c
    old new  
    417417
    418418        for (y = si->ysize -1; y >= 0; y--) {
    419419            offsettab[(z * si->ysize) + y] = url_ftell(pb);
    420             lengthtab[(z * si->ysize) + y] = rle_row(pb, srcrow,
     420            lengthtab[(z * si->ysize) + y] = rle_row(pb, (char *)srcrow,
    421421                    si->zsize, si->xsize);
    422422            srcrow += info->pict.linesize[0];
    423423        }
  • libavformat/utils.c

    diff -Naur main2/libavformat/utils.c main/libavformat/utils.c
    old new  
    11401140        return -1;
    11411141
    11421142    entries = av_fast_realloc(st->index_entries,
    1143                               &st->index_entries_allocated_size,
     1143                              (unsigned int *)&st->index_entries_allocated_size,
    11441144                              (st->nb_index_entries + 1) *
    11451145                              sizeof(AVIndexEntry));
    11461146    if(!entries)
  • libavformat/wc3movie.c

    diff -Naur main2/libavformat/wc3movie.c main/libavformat/wc3movie.c
    old new  
    182182                bytes_to_read = size;
    183183            else
    184184                bytes_to_read = 512;
    185             if ((ret = get_buffer(pb, s->title, bytes_to_read)) != bytes_to_read)
     185            if ((ret = get_buffer(pb, (unsigned char*)s->title, bytes_to_read)) != bytes_to_read)
    186186                return AVERROR_IO;
    187187            break;
    188188
  • libavformat/yuv4mpeg.c

    diff -Naur main2/libavformat/yuv4mpeg.c main/libavformat/yuv4mpeg.c
    old new  
    105105            av_log(s, AV_LOG_ERROR, "Error. YUV4MPEG stream header write failed.\n");
    106106            return AVERROR_IO;
    107107        } else {
    108             put_buffer(pb, buf2, strlen(buf2));
     108            put_buffer(pb, (unsigned char *)buf2, strlen(buf2));
    109109        }
    110110    }
    111111
    112112    /* construct frame header */
    113113
    114114    m = snprintf(buf1, sizeof(buf1), "%s\n", Y4M_FRAME_MAGIC);
    115     put_buffer(pb, buf1, strlen(buf1));
     115    put_buffer(pb, (unsigned char *)buf1, strlen(buf1));
    116116
    117117    width = st->codec->width;
    118118    height = st->codec->height;
     
    387387    /* check file header */
    388388    if (pd->buf_size <= sizeof(Y4M_MAGIC))
    389389        return 0;
    390     if (strncmp(pd->buf, Y4M_MAGIC, sizeof(Y4M_MAGIC)-1)==0)
     390    if (strncmp((char *)pd->buf, Y4M_MAGIC, sizeof(Y4M_MAGIC)-1)==0)
    391391        return AVPROBE_SCORE_MAX;
    392392    else
    393393        return 0;
  • libmpcodecs/ad_acm.c

    diff -Naur main2/libmpcodecs/ad_acm.c main/libmpcodecs/ad_acm.c
    old new  
    3131
    3232static int init(sh_audio_t *sh_audio)
    3333{
    34     int ret=decode_audio(sh_audio,sh_audio->a_buffer,4096,sh_audio->a_buffer_size);
     34    int ret=decode_audio(sh_audio,(unsigned char *)sh_audio->a_buffer,4096,sh_audio->a_buffer_size);
    3535    if(ret<0){
    3636        mp_msg(MSGT_DECAUDIO,MSGL_INFO,"ACM decoding error: %d\n",ret);
    3737        return 0;
     
    201201    if(srcsize>sh_audio->a_in_buffer_size) srcsize=sh_audio->a_in_buffer_size; // !!!!!!
    202202    if(sh_audio->a_in_buffer_len<srcsize){
    203203      sh_audio->a_in_buffer_len+=
    204         demux_read_data(sh_audio->ds,&sh_audio->a_in_buffer[sh_audio->a_in_buffer_len],
     204        demux_read_data(sh_audio->ds,(unsigned char *)&sh_audio->a_in_buffer[sh_audio->a_in_buffer_len],
    205205        srcsize-sh_audio->a_in_buffer_len);
    206206    }
    207207    mp_msg(MSGT_WIN32,MSGL_DBG3,"acm convert %d -> %ld bytes\n",sh_audio->a_in_buffer_len,len);
  • libmpcodecs/ad_dk3adpcm.c

    diff -Naur main2/libmpcodecs/ad_dk3adpcm.c main/libmpcodecs/ad_dk3adpcm.c
    old new  
    9595static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...)
    9696{
    9797  if(cmd==ADCTRL_SKIP_FRAME){
    98     demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
     98    demux_read_data(sh_audio->ds, (unsigned char *)sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
    9999    return CONTROL_TRUE;
    100100  }
    101101  return CONTROL_UNKNOWN;
     
    232232
    233233static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
    234234{
    235   if (demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,
     235  if (demux_read_data(sh_audio->ds, (unsigned char *)sh_audio->a_in_buffer,
    236236    sh_audio->ds->ss_mul) !=
    237237    sh_audio->ds->ss_mul)
    238238      return -1; /* EOF */
     
    242242    return -1;
    243243  }
    244244  return 2 * dk3_adpcm_decode_block(
    245     (unsigned short*)buf, sh_audio->a_in_buffer,
     245    (unsigned short*)buf, (unsigned char *)sh_audio->a_in_buffer,
    246246    sh_audio->ds->ss_mul);
    247247}
  • libmpcodecs/ad_dmo.c

    diff -Naur main2/libmpcodecs/ad_dmo.c main/libmpcodecs/ad_dmo.c
    old new  
    8686        if(srcsize>sh_audio->a_in_buffer_size) srcsize=sh_audio->a_in_buffer_size; // !!!!!!
    8787        if(sh_audio->a_in_buffer_len<srcsize){
    8888          sh_audio->a_in_buffer_len+=
    89             demux_read_data(sh_audio->ds,&sh_audio->a_in_buffer[sh_audio->a_in_buffer_len],
     89            demux_read_data(sh_audio->ds,(unsigned char *)&sh_audio->a_in_buffer[sh_audio->a_in_buffer_len],
    9090            srcsize-sh_audio->a_in_buffer_len);
    9191        }
    9292        DMO_AudioDecoder_Convert(ds_adec, sh_audio->a_in_buffer,sh_audio->a_in_buffer_len,
    93             buf,maxlen, &size_in,&size_out);
     93            buf,maxlen, (unsigned int *)&size_in,(unsigned int *)&size_out);
    9494        mp_dbg(MSGT_DECAUDIO,MSGL_DBG2,"DMO: audio %d -> %d converted  (in_buf_len=%d of %d)  %d\n",size_in,size_out,sh_audio->a_in_buffer_len,sh_audio->a_in_buffer_size,ds_tell_pts(sh_audio->ds));
    9595        if(size_in>=sh_audio->a_in_buffer_len){
    9696          sh_audio->a_in_buffer_len=0;
  • libmpcodecs/ad_dshow.c

    diff -Naur main2/libmpcodecs/ad_dshow.c main/libmpcodecs/ad_dshow.c
    old new  
    8282        if(srcsize>sh_audio->a_in_buffer_size) srcsize=sh_audio->a_in_buffer_size; // !!!!!!
    8383        if(sh_audio->a_in_buffer_len<srcsize){
    8484          sh_audio->a_in_buffer_len+=
    85             demux_read_data(sh_audio->ds,&sh_audio->a_in_buffer[sh_audio->a_in_buffer_len],
     85            demux_read_data(sh_audio->ds,(unsigned char *)&sh_audio->a_in_buffer[sh_audio->a_in_buffer_len],
    8686            srcsize-sh_audio->a_in_buffer_len);
    8787        }
    8888        DS_AudioDecoder_Convert(ds_adec, sh_audio->a_in_buffer,sh_audio->a_in_buffer_len,
    89             buf,maxlen, &size_in,&size_out);
     89            buf,maxlen, (unsigned int *)&size_in,(unsigned int *)&size_out);
    9090        mp_dbg(MSGT_DECAUDIO,MSGL_DBG2,"DShow: audio %d -> %d converted  (in_buf_len=%d of %d)  %d\n",size_in,size_out,sh_audio->a_in_buffer_len,sh_audio->a_in_buffer_size,ds_tell_pts(sh_audio->ds));
    9191        if(size_in>=sh_audio->a_in_buffer_len){
    9292          sh_audio->a_in_buffer_len=0;
  • libmpcodecs/ad_dvdpcm.c

    diff -Naur main2/libmpcodecs/ad_dvdpcm.c main/libmpcodecs/ad_dvdpcm.c
    old new  
    9494      // can somebody clarify?
    9595      for (j = 0; j < minlen; j += 12) {
    9696        char tmp[10];
    97         len = demux_read_data(sh_audio->ds, tmp, 10);
     97        len = demux_read_data(sh_audio->ds, (unsigned char *)tmp, 10);
    9898        if (len < 10) break;
    9999        // first sample
    100100        buf[j + 0] = tmp[0];
     
    118118      // 24 bit
    119119      for (j = 0; j < minlen; j += 12) {
    120120        char tmp[12];
    121         len = demux_read_data(sh_audio->ds, tmp, 12);
     121        len = demux_read_data(sh_audio->ds, (unsigned char *)tmp, 12);
    122122        if (len < 12) break;
    123123        // first sample
    124124        buf[j + 0] = tmp[0];
  • libmpcodecs/ad_faad.c

    diff -Naur main2/libmpcodecs/ad_faad.c main/libmpcodecs/ad_faad.c
    old new  
    7777  // If we don't get the ES descriptor, try manual config
    7878  if(!sh->codecdata_len && sh->wf) {
    7979    sh->codecdata_len = sh->wf->cbSize;
    80     sh->codecdata = (char*)(sh->wf+1);
     80    sh->codecdata = (unsigned char*)(sh->wf+1);
    8181    mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: codecdata extracted from WAVEFORMATEX\n");
    8282  }
    8383  if(!sh->codecdata_len) {
     
    112112    faacDecSetConfiguration(faac_hdec, faac_conf);
    113113#endif
    114114
    115     sh->a_in_buffer_len = demux_read_data(sh->ds, sh->a_in_buffer, sh->a_in_buffer_size);
    116     pos = aac_probe(sh->a_in_buffer, sh->a_in_buffer_len);
     115    sh->a_in_buffer_len = demux_read_data(sh->ds, (unsigned char *)sh->a_in_buffer, sh->a_in_buffer_size);
     116    pos = aac_probe((unsigned char *)sh->a_in_buffer, sh->a_in_buffer_len);
    117117    if(pos) {
    118118      sh->a_in_buffer_len -= pos;
    119119      memmove(sh->a_in_buffer, &(sh->a_in_buffer[pos]), sh->a_in_buffer_len);
    120120      sh->a_in_buffer_len +=
    121         demux_read_data(sh->ds,&(sh->a_in_buffer[sh->a_in_buffer_len]),
     121        demux_read_data(sh->ds,(unsigned char *)&(sh->a_in_buffer[sh->a_in_buffer_len]),
    122122        sh->a_in_buffer_size - sh->a_in_buffer_len);
    123123      pos = 0;
    124124    }
    125125
    126126    /* init the codec */
    127     faac_init = faacDecInit(faac_hdec, sh->a_in_buffer,
     127    faac_init = faacDecInit(faac_hdec, (unsigned char *)sh->a_in_buffer,
    128128       sh->a_in_buffer_len, &faac_samplerate, &faac_channels);
    129129
    130130    sh->a_in_buffer_len -= (faac_init > 0)?faac_init:0; // how many bytes init consumed
     
    178178  if(!sh->codecdata_len) {
    179179    if(sh->a_in_buffer_len < sh->a_in_buffer_size){
    180180      sh->a_in_buffer_len +=
    181         demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],
     181        demux_read_data(sh->ds,(unsigned char *)&sh->a_in_buffer[sh->a_in_buffer_len],
    182182        sh->a_in_buffer_size - sh->a_in_buffer_len);
    183183    }
    184     pos = aac_probe(sh->a_in_buffer, sh->a_in_buffer_len);
     184    pos = aac_probe((unsigned char *)sh->a_in_buffer, sh->a_in_buffer_len);
    185185    if(pos) {
    186186      sh->a_in_buffer_len -= pos;
    187187      memmove(sh->a_in_buffer, &(sh->a_in_buffer[pos]), sh->a_in_buffer_len);
     
    218218  if(!sh->codecdata_len)
    219219    if(sh->a_in_buffer_len < sh->a_in_buffer_size){
    220220      sh->a_in_buffer_len +=
    221         demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],
     221        demux_read_data(sh->ds,(unsigned char *)&sh->a_in_buffer[sh->a_in_buffer_len],
    222222        sh->a_in_buffer_size - sh->a_in_buffer_len);
    223223    }
    224224         
     
    232232  if(!sh->codecdata_len){
    233233   // raw aac stream:
    234234   do {
    235     faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, sh->a_in_buffer+j, sh->a_in_buffer_len);
     235    faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, (unsigned char *)sh->a_in_buffer+j, sh->a_in_buffer_len);
    236236       
    237237    /* update buffer index after faacDecDecode */
    238238    if(faac_finfo.bytesconsumed >= sh->a_in_buffer_len) {
  • libmpcodecs/ad_ffmpeg.c

    diff -Naur main2/libmpcodecs/ad_ffmpeg.c main/libmpcodecs/ad_ffmpeg.c
    old new  
    106106   }
    107107
    108108   // Decode at least 1 byte:  (to get header filled)
    109    x=decode_audio(sh_audio,sh_audio->a_buffer,1,sh_audio->a_buffer_size);
     109   x=decode_audio(sh_audio,(unsigned char *)sh_audio->a_buffer,1,sh_audio->a_buffer_size);
    110110   if(x>0) sh_audio->a_buffer_len=x;
    111111
    112112#if 1
  • libmpcodecs/ad_hwac3.c

    diff -Naur main2/libmpcodecs/ad_hwac3.c main/libmpcodecs/ad_hwac3.c
    old new  
    5959      sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++] = c;
    6060    }
    6161
    62     length = dts_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
     62    length = dts_syncinfo((uint8_t *)sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
    6363    if(length >= 10)
    6464    {
    6565      if(isdts != 1)
     
    6969      }
    7070      break;
    7171    }
    72     length = a52_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
     72    length = a52_syncinfo((uint8_t *)sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
    7373    if(length >= 7 && length <= 3840)
    7474    {
    7575      if(isdts != 0)
     
    8787
    8888  sh_audio->samplerate = sample_rate;
    8989  sh_audio->i_bps = bit_rate / 8;
    90   demux_read_data(sh_audio->ds, sh_audio->a_in_buffer + 10, length - 10);
     90  demux_read_data(sh_audio->ds, (unsigned char *)sh_audio->a_in_buffer + 10, length - 10);
    9191  sh_audio->a_in_buffer_len = length;
    9292   
    9393  // TODO: is DTS also checksummed?
    94   if(isdts == 0 && crc16_block(sh_audio->a_in_buffer + 2, length - 2) != 0)
     94  if(isdts == 0 && crc16_block((uint8_t *)sh_audio->a_in_buffer + 2, length - 2) != 0)
    9595    mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "a52: CRC check failed!  \n");
    9696   
    9797  return length;
     
    154154
    155155  if(isdts == 1)
    156156  {
    157     return decode_audio_dts(sh_audio->a_in_buffer, len, buf);
     157    return decode_audio_dts((uint8_t *)sh_audio->a_in_buffer, len, buf);
    158158  }
    159159  else if(isdts == 0)
    160160  {
  • libmpcodecs/ad_hwmpa.c

    diff -Naur main2/libmpcodecs/ad_hwmpa.c main/libmpcodecs/ad_hwmpa.c
    old new  
    3838                {
    3939                        if(((sh->a_in_buffer[cnt] << 8) | sh->a_in_buffer[cnt+1]) & 0xffe0 != 0xffe0)
    4040                                continue;
    41                         x = mp_get_mp3_header(&(sh->a_in_buffer[cnt]), chans, srate, spf, mpa_layer, br);
     41                        x = mp_get_mp3_header((unsigned char *)&(sh->a_in_buffer[cnt]), chans, srate, spf, mpa_layer, br);
    4242                        if(x > 0)
    4343                        {
    4444                                frames_count++;
     
    5050                        }
    5151                        cnt++;
    5252                }
    53                 len = demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],sh->a_in_buffer_size-sh->a_in_buffer_len);
     53                len = demux_read_data(sh->ds,(unsigned char *)&sh->a_in_buffer[sh->a_in_buffer_len],sh->a_in_buffer_size-sh->a_in_buffer_len);
    5454                if(len > 0)
    5555                        sh->a_in_buffer_len += len;
    5656        } while(len > 0);
  • libmpcodecs/ad_imaadpcm.c

    diff -Naur main2/libmpcodecs/ad_imaadpcm.c main/libmpcodecs/ad_imaadpcm.c
    old new  
    123123static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...)
    124124{
    125125  if(cmd==ADCTRL_SKIP_FRAME){
    126     demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
     126    demux_read_data(sh_audio->ds, (unsigned char *)sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
    127127    return CONTROL_TRUE;
    128128  }
    129129  return CONTROL_UNKNOWN;
     
    350350
    351351static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
    352352{
    353   if (demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,
     353  if (demux_read_data(sh_audio->ds, (unsigned char *)sh_audio->a_in_buffer,
    354354    sh_audio->ds->ss_mul) !=
    355355    sh_audio->ds->ss_mul)
    356356    return -1;
     
    358358  if ((sh_audio->format == 0x11) || (sh_audio->format == 0x1100736d))
    359359  {
    360360    return 2 * ms_ima_adpcm_decode_block(
    361       (unsigned short*)buf, sh_audio->a_in_buffer, sh_audio->wf->nChannels,
     361      (unsigned short*)buf, (unsigned char *)sh_audio->a_in_buffer, sh_audio->wf->nChannels,
    362362      sh_audio->ds->ss_mul);
    363363  }
    364364  else if (sh_audio->format == 0x61)
    365365  {
    366366    return 2 * dk4_ima_adpcm_decode_block(
    367       (unsigned short*)buf, sh_audio->a_in_buffer, sh_audio->wf->nChannels,
     367      (unsigned short*)buf, (unsigned char *)sh_audio->a_in_buffer, sh_audio->wf->nChannels,
    368368      sh_audio->ds->ss_mul);
    369369  }
    370370  else
    371371  {
    372372    return 2 * qt_ima_adpcm_decode_block(
    373       (unsigned short*)buf, sh_audio->a_in_buffer, sh_audio->wf->nChannels);
     373      (unsigned short*)buf, (unsigned char *)sh_audio->a_in_buffer, sh_audio->wf->nChannels);
    374374  }
    375375}
  • libmpcodecs/ad_liba52.c

    diff -Naur main2/libmpcodecs/ad_liba52.c main/libmpcodecs/ad_liba52.c
    old new  
    6969        sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c;
    7070    }
    7171    if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
    72     length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
     72    length = a52_syncinfo ((uint8_t *)sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
    7373    if(length>=7 && length<=3840) break; /* we're done.*/
    7474    /* bad file => resync*/
    7575    if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
     
    8080    sh_audio->samplerate=sample_rate;
    8181    sh_audio->i_bps=bit_rate/8;
    8282    sh_audio->samplesize=sh_audio->sample_format==AF_FORMAT_FLOAT_NE ? 4 : 2;
    83     demux_read_data(sh_audio->ds,sh_audio->a_in_buffer+8,length-8);
     83    demux_read_data(sh_audio->ds,(unsigned char *)sh_audio->a_in_buffer+8,length-8);
    8484    if(sh_audio->format!=0x2000)
    8585        swab(sh_audio->a_in_buffer+8,sh_audio->a_in_buffer+8,length-8);
    8686   
    87     if(crc16_block(sh_audio->a_in_buffer+2,length-2)!=0)
     87    if(crc16_block((uint8_t *)sh_audio->a_in_buffer+2,length-2)!=0)
    8888        mp_msg(MSGT_DECAUDIO,MSGL_STATUS,"a52: CRC check failed!  \n");
    8989   
    9090    return length;
     
    9595int flags, sample_rate, bit_rate;
    9696char* mode="unknown";
    9797int channels=0;
    98   a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
     98  a52_syncinfo ((uint8_t *)sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
    9999  switch(flags&A52_CHANNEL_MASK){
    100100    case A52_CHANNEL: mode="channel"; channels=2; break;
    101101    case A52_MONO: mode="mono"; channels=1; break;
     
    210210  /* test:*/
    211211  flags=a52_flags|A52_ADJUST_LEVEL;
    212212  mp_msg(MSGT_DECAUDIO,MSGL_V,"A52 flags before a52_frame: 0x%X\n",flags);
    213   if (a52_frame (&a52_state, sh_audio->a_in_buffer, &flags, &level, bias)){
     213  if (a52_frame (&a52_state, (unsigned char *)sh_audio->a_in_buffer, &flags, &level, bias)){
    214214    mp_msg(MSGT_DECAUDIO,MSGL_ERR,"a52: error decoding frame -> nosound\n");
    215215    return 0;
    216216  }
     
    297297        if(!sh_audio->a_in_buffer_len)
    298298            if(a52_fillbuff(sh_audio)<0) return len; /* EOF */
    299299        sh_audio->a_in_buffer_len=0;
    300         if (a52_frame (&a52_state, sh_audio->a_in_buffer, &flags, &level, bias)){
     300        if (a52_frame (&a52_state, (unsigned char *)sh_audio->a_in_buffer, &flags, &level, bias)){
    301301            mp_msg(MSGT_DECAUDIO,MSGL_WARN,"a52: error decoding frame\n");
    302302            return len;
    303303        }
  • libmpcodecs/ad_libvorbis.c

    diff -Naur main2/libmpcodecs/ad_libvorbis.c main/libmpcodecs/ad_libvorbis.c
    old new  
    8989  }
    9090
    9191  mp_msg(MSGT_DECAUDIO,MSGL_V,"ad_vorbis, extradata seems is %d bytes long\n", sh->wf->cbSize);
    92   extradata = (char*) (sh->wf+1);
     92  extradata = (unsigned char*) (sh->wf+1);
    9393  if(!extradata) {
    9494    mp_msg(MSGT_DECAUDIO,MSGL_ERR,"ad_vorbis, extradata seems to be NULL!, exit\n");
    9595    ERROR();
  • libmpcodecs/ad_mp3lib.c

    diff -Naur main2/libmpcodecs/ad_mp3lib.c main/libmpcodecs/ad_mp3lib.c
    old new  
    2626
    2727// MP3 decoder buffer callback:
    2828int mplayer_audio_read(char *buf,int size){
    29   return demux_read_data(dec_audio_sh->ds,buf,size);
     29  return demux_read_data(dec_audio_sh->ds,(unsigned char *)buf,size);
    3030}
    3131
    3232static int preinit(sh_audio_t *sh)
     
    4646  MP3_Init();
    4747#endif
    4848  MP3_samplerate=MP3_channels=0;
    49   sh->a_buffer_len=MP3_DecodeFrame(sh->a_buffer,-1);
     49  sh->a_buffer_len=MP3_DecodeFrame((unsigned char *)sh->a_buffer,-1);
    5050  if(!sh->a_buffer_len) return 0; // unsupported layer/format
    5151  sh->channels=2; // hack
    5252  sh->samplesize=2;
  • libmpcodecs/ad_msadpcm.c

    diff -Naur main2/libmpcodecs/ad_msadpcm.c main/libmpcodecs/ad_msadpcm.c
    old new  
    9090static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...)
    9191{
    9292  if(cmd==ADCTRL_SKIP_FRAME){
    93     demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
     93    demux_read_data(sh_audio->ds, (unsigned char *)sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
    9494    return CONTROL_TRUE;
    9595  }
    9696  return CONTROL_UNKNOWN;
     
    205205
    206206static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
    207207{
    208   if (demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,
     208  if (demux_read_data(sh_audio->ds, (unsigned char *)sh_audio->a_in_buffer,
    209209    sh_audio->ds->ss_mul) !=
    210210    sh_audio->ds->ss_mul)
    211211      return -1; /* EOF */
    212212
    213213  return 2 * ms_adpcm_decode_block(
    214     (unsigned short*)buf, sh_audio->a_in_buffer,
     214    (unsigned short*)buf, (unsigned char *)sh_audio->a_in_buffer,
    215215    sh_audio->wf->nChannels, sh_audio->wf->nBlockAlign);
    216216}
  • libmpcodecs/ad_qtaudio.c

    diff -Naur main2/libmpcodecs/ad_qtaudio.c main/libmpcodecs/ad_qtaudio.c
    old new  
    304304//      InputBufferSize, FramesToGet*OutFrameSize);
    305305
    306306    if(InputBufferSize>sh->a_in_buffer_len){
    307         int x=demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],
     307        int x=demux_read_data(sh->ds,(unsigned char *)&sh->a_in_buffer[sh->a_in_buffer_len],
    308308            InputBufferSize-sh->a_in_buffer_len);
    309309        if(x>0) sh->a_in_buffer_len+=x;
    310310        if(InputBufferSize>sh->a_in_buffer_len)
  • libmpcodecs/ad_realaud.c

    diff -Naur main2/libmpcodecs/ad_realaud.c main/libmpcodecs/ad_realaud.c
    old new  
    412412
    413413  if(sh->a_in_buffer_len<=0){
    414414      // fill the buffer!
    415       demux_read_data(sh->ds, sh->a_in_buffer, sh->wf->nBlockAlign);
     415      demux_read_data(sh->ds, (unsigned char *)sh->a_in_buffer, sh->wf->nBlockAlign);
    416416      sh->a_in_buffer_size=
    417417      sh->a_in_buffer_len=sh->wf->nBlockAlign;
    418418  }
    419419 
    420420#ifdef USE_WIN32DLL
    421421    if (dll_type == 1)
    422       result=wraDecode(sh->context, sh->a_in_buffer+sh->a_in_buffer_size-sh->a_in_buffer_len, sh->wf->nBlockAlign,
    423        buf, &len, -1);
     422      result=wraDecode(sh->context, (char *)sh->a_in_buffer+sh->a_in_buffer_size-sh->a_in_buffer_len, sh->wf->nBlockAlign,
     423       (char *)buf, (unsigned int *)&len, -1);
    424424    else
    425425#endif
    426   result=raDecode(sh->context, sh->a_in_buffer+sh->a_in_buffer_size-sh->a_in_buffer_len, sh->wf->nBlockAlign,
    427        buf, &len, -1);
     426  result=raDecode(sh->context, (char *)sh->a_in_buffer+sh->a_in_buffer_size-sh->a_in_buffer_len, sh->wf->nBlockAlign,
     427       (char *)buf, (unsigned int *)&len, -1);
    428428  sh->a_in_buffer_len-=sh->wf->nBlockAlign;
    429429 
    430430//  printf("radecode: %d bytes, res=0x%X  \n",len,result);
  • libmpcodecs/ad_twin.c

    diff -Naur main2/libmpcodecs/ad_twin.c main/libmpcodecs/ad_twin.c
    old new  
    212212    mask = 0x1;
    213213    for ( ibits=0; ibits<nbits; ibits++ ){
    214214        if ( priv->readable == 0 ){  /* when the file data buffer is empty */
    215             priv->nbuf = demux_read_data(sh->ds, priv->buf, BBUFSIZ);
     215            priv->nbuf = demux_read_data(sh->ds, (unsigned char *)priv->buf, BBUFSIZ);
    216216            priv->nbuf *= 8;
    217217            priv->readable = 1;
    218218        }
  • libmpcodecs/dec_audio.c

    diff -Naur main2/libmpcodecs/dec_audio.c main/libmpcodecs/dec_audio.c
    old new  
    136136        // restore original fourcc:
    137137        if(sh_audio->wf) sh_audio->wf->wFormatTag=i=orig_fourcc;
    138138        if(!(sh_audio->codec=find_audio_codec(sh_audio->format,
    139           sh_audio->wf?(&i):NULL, sh_audio->codec, force) )) break;
     139          (unsigned int *)(sh_audio->wf?(&i):NULL), sh_audio->codec, force) )) break;
    140140        if(sh_audio->wf) sh_audio->wf->wFormatTag=i;
    141141        // ok we found one codec
    142142        if(sh_audio->codec->flags&CODECS_FLAG_SELECTED) continue; // already tried & failed
     
    378378      if(maxlen<sh_audio->audio_out_minsize) break; // don't overflow buffer!
    379379      // not enough decoded data waiting, decode 'len' bytes more:
    380380      len=mpadec->decode_audio(sh_audio,
    381           sh_audio->a_buffer+sh_audio->a_buffer_len, len, maxlen);
     381          (unsigned char *)(sh_audio->a_buffer+sh_audio->a_buffer_len), len, maxlen);
    382382      if(len<=0) break; // EOF?
    383383      sh_audio->a_buffer_len+=len;
    384384  }
  • libmpcodecs/native/RTjpegN.c

    diff -Naur main2/libmpcodecs/native/RTjpegN.c main/libmpcodecs/native/RTjpegN.c
    old new  
    28822882   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    28832883   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    28842884
    2885    RTjpeg_dctY(bp1+j, RTjpeg_block, RTjpeg_Ywidth);
     2885   RTjpeg_dctY((unsigned char *)bp1+j, RTjpeg_block, RTjpeg_Ywidth);
    28862886   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    28872887   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    28882888
    2889    RTjpeg_dctY(bp1+j+8, RTjpeg_block, RTjpeg_Ywidth);
     2889   RTjpeg_dctY((unsigned char *)bp1+j+8, RTjpeg_block, RTjpeg_Ywidth);
    28902890   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    28912891   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    28922892
    2893    RTjpeg_dctY(bp2+k, RTjpeg_block, RTjpeg_Cwidth);
     2893   RTjpeg_dctY((unsigned char *)bp2+k, RTjpeg_block, RTjpeg_Cwidth);
    28942894   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    28952895   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    28962896
    2897    RTjpeg_dctY(bp3+k, RTjpeg_block, RTjpeg_Cwidth);
     2897   RTjpeg_dctY((unsigned char *)bp3+k, RTjpeg_block, RTjpeg_Cwidth);
    28982898   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    28992899   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    29002900
     
    29352935   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    29362936   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    29372937
    2938    RTjpeg_dctY(bp2+k, RTjpeg_block, RTjpeg_Cwidth);
     2938   RTjpeg_dctY((unsigned char *)bp2+k, RTjpeg_block, RTjpeg_Cwidth);
    29392939   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    29402940   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    29412941
    2942    RTjpeg_dctY(bp3+k, RTjpeg_block, RTjpeg_Cwidth);
     2942   RTjpeg_dctY((unsigned char *)bp3+k, RTjpeg_block, RTjpeg_Cwidth);
    29432943   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    29442944   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    29452945
     
    30133013   else
    30143014   {
    30153015    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt);
    3016     RTjpeg_idct(bp2+k, RTjpeg_block, RTjpeg_width>>1);
     3016    RTjpeg_idct((unsigned char *)bp2+k, RTjpeg_block, RTjpeg_width>>1);
    30173017   }
    30183018   if(*sp==-1)sp++;
    30193019   else
    30203020   {
    30213021    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt);
    3022     RTjpeg_idct(bp3+k, RTjpeg_block, RTjpeg_width>>1);
     3022    RTjpeg_idct((unsigned char *)bp3+k, RTjpeg_block, RTjpeg_width>>1);
    30233023   }
    30243024  }
    30253025  bp+=RTjpeg_width<<3;
     
    30623062   else
    30633063   {
    30643064    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_lb8, RTjpeg_liqt);
    3065     RTjpeg_idct(bp1+j, RTjpeg_block, RTjpeg_width);
     3065    RTjpeg_idct((unsigned char *)bp1+j, RTjpeg_block, RTjpeg_width);
    30663066   }
    30673067   if(*sp==-1)sp++;
    30683068   else
    30693069   {
    30703070    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_lb8, RTjpeg_liqt);
    3071     RTjpeg_idct(bp1+j+8, RTjpeg_block, RTjpeg_width);
     3071    RTjpeg_idct((unsigned char *)bp1+j+8, RTjpeg_block, RTjpeg_width);
    30723072   }
    30733073   if(*sp==-1)sp++;
    30743074   else
    30753075   {
    30763076    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt);
    3077     RTjpeg_idct(bp2+k, RTjpeg_block, RTjpeg_width>>1);
     3077    RTjpeg_idct((unsigned char *)bp2+k, RTjpeg_block, RTjpeg_width>>1);
    30783078   }
    30793079   if(*sp==-1)sp++;
    30803080   else
    30813081   {
    30823082    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt);
    3083     RTjpeg_idct(bp3+k, RTjpeg_block, RTjpeg_width>>1);
     3083    RTjpeg_idct((unsigned char *)bp3+k, RTjpeg_block, RTjpeg_width>>1);
    30843084   }
    30853085  }
    30863086  bp+=RTjpeg_width<<4;
     
    32533253        else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    32543254   block+=64;
    32553255
    3256    RTjpeg_dctY(bp1+j, RTjpeg_block, RTjpeg_Ywidth);
     3256   RTjpeg_dctY((unsigned char *)bp1+j, RTjpeg_block, RTjpeg_Ywidth);
    32573257   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    32583258   if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    32593259   {
     
    32623262        else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    32633263   block+=64;
    32643264
    3265    RTjpeg_dctY(bp1+j+8, RTjpeg_block, RTjpeg_Ywidth);
     3265   RTjpeg_dctY((unsigned char *)bp1+j+8, RTjpeg_block, RTjpeg_Ywidth);
    32663266   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
    32673267   if(RTjpeg_bcomp(block, &RTjpeg_lmask))
    32683268   {
     
    32713271        else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    32723272   block+=64;
    32733273
    3274    RTjpeg_dctY(bp2+k, RTjpeg_block, RTjpeg_Cwidth);
     3274   RTjpeg_dctY((unsigned char *)bp2+k, RTjpeg_block, RTjpeg_Cwidth);
    32753275   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    32763276   if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    32773277   {
     
    32803280        else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    32813281   block+=64;
    32823282
    3283    RTjpeg_dctY(bp3+k, RTjpeg_block, RTjpeg_Cwidth);
     3283   RTjpeg_dctY((unsigned char *)bp3+k, RTjpeg_block, RTjpeg_Cwidth);
    32843284   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    32853285   if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    32863286   {
     
    33483348        else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
    33493349   block+=64;
    33503350
    3351    RTjpeg_dctY(bp2+k, RTjpeg_block, RTjpeg_Cwidth);
     3351   RTjpeg_dctY((unsigned char *)bp2+k, RTjpeg_block, RTjpeg_Cwidth);
    33523352   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    33533353   if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    33543354   {
     
    33573357        else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
    33583358   block+=64;
    33593359
    3360    RTjpeg_dctY(bp3+k, RTjpeg_block, RTjpeg_Cwidth);
     3360   RTjpeg_dctY((unsigned char *)bp3+k, RTjpeg_block, RTjpeg_Cwidth);
    33613361   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
    33623362   if(RTjpeg_bcomp(block, &RTjpeg_cmask))
    33633363   {
  • libmpcodecs/vd_dmo.c

    diff -Naur main2/libmpcodecs/vd_dmo.c main/libmpcodecs/vd_dmo.c
    old new  
    8181        return NULL;
    8282    }
    8383
    84     DMO_VideoDecoder_DecodeInternal(sh->context, data, len, 1, mpi->planes[0]);
     84    DMO_VideoDecoder_DecodeInternal(sh->context, data, len, 1, (char *)mpi->planes[0]);
    8585
    8686    return mpi;
    8787}
  • libmpcodecs/vd_dshow.c

    diff -Naur main2/libmpcodecs/vd_dshow.c main/libmpcodecs/vd_dshow.c
    old new  
    110110        return NULL;
    111111    }
    112112
    113     DS_VideoDecoder_DecodeInternal(sh->context, data, len, 0, mpi->planes[0]);
     113    DS_VideoDecoder_DecodeInternal(sh->context, data, len, 0, (char *)mpi->planes[0]);
    114114
    115115    return mpi;
    116116}
  • libmpcodecs/vd_lzo.c

    diff -Naur main2/libmpcodecs/vd_lzo.c main/libmpcodecs/vd_lzo.c
    old new  
    119119            );
    120120
    121121        /* decompress the frame */
    122         r = lzo1x_decompress (data, len, tmp, &w, priv->wrkmem);
     122        r = lzo1x_decompress (data, len, tmp, (unsigned int *)&w, priv->wrkmem);
    123123
    124124        if (r != LZO_E_OK) {
    125125            /* this should NEVER happen */
     
    154154            return NULL;
    155155    }
    156156
    157     r = lzo1x_decompress (data, len, mpi->planes[0], &w, priv->wrkmem);
     157    r = lzo1x_decompress (data, len, mpi->planes[0], (unsigned int *)&w, priv->wrkmem);
    158158    if (r != LZO_E_OK) {
    159159        /* this should NEVER happen */
    160160        mp_msg (MSGT_DECVIDEO, MSGL_ERR,
  • libmpcodecs/vd_mpng.c

    diff -Naur main2/libmpcodecs/vd_mpng.c main/libmpcodecs/vd_mpng.c
    old new  
    146146
    147147 if (out_fmt==IMGFMT_BGR8) {
    148148     png_get_PLTE( png,info,&pal,&cols );
    149      mpi->planes[1] = (char*)realloc(mpi->planes[1], 4*cols);
     149     mpi->planes[1] = (unsigned char*)realloc(mpi->planes[1], 4*cols);
    150150     p = mpi->planes[1];
    151151     for (i = 0; i < cols; i++) {
    152152         *p++ = pal[i].blue;
  • libmpcodecs/vd_realvid.c

    diff -Naur main2/libmpcodecs/vd_realvid.c main/libmpcodecs/vd_realvid.c
    old new  
    334334       
    335335#ifdef USE_WIN32DLL
    336336        if (dll_type == 1)
    337             result=(*wrvyuv_transform)(dp_data, buffer, &transform_in,
     337            result=(*wrvyuv_transform)((char *)dp_data, (char *)buffer, &transform_in,
    338338                transform_out, sh->context);
    339339        else
    340340#endif
    341         result=(*rvyuv_transform)(dp_data, buffer, &transform_in,
     341        result=(*rvyuv_transform)((char *)dp_data, (char *)buffer, &transform_in,
    342342                transform_out, sh->context);
    343343
    344344        if(!inited){  // rv30 width/height now known
  • libmpcodecs/ve_nuv.c

    diff -Naur main2/libmpcodecs/ve_nuv.c main/libmpcodecs/ve_nuv.c
    old new  
    129129    // Try lzo ???
    130130    if(vf->priv->lzo) {
    131131      r = lzo1x_1_compress(mpi->planes[0],mpi->width*mpi->height*3/2,
    132                            zdata,&zlen,vf->priv->zmem);
     132                           zdata,(unsigned int *)&zlen,vf->priv->zmem);
    133133      if(r != LZO_E_OK) {
    134134        mp_msg(MSGT_VFILTER,MSGL_ERR,"LZO compress error\n");
    135135        zlen = 0;
     
    146146    }
    147147
    148148  } else { // RTjpeg compression
    149     len = RTjpeg_mcompressYUV420(data,mpi->planes[0],vf->priv->l,
     149    len = RTjpeg_mcompressYUV420((signed char *)data,mpi->planes[0],vf->priv->l,
    150150                                 vf->priv->c);
    151151    if(len <= 0) {
    152152      mp_msg(MSGT_VFILTER,MSGL_ERR,"RTjpeg_mcompressYUV420 error (%d)\n",len);
     
    154154    }
    155155
    156156    if(vf->priv->lzo) {
    157       r = lzo1x_1_compress(data,len,zdata,&zlen,vf->priv->zmem);
     157      r = lzo1x_1_compress(data,len,zdata,(unsigned int *)&zlen,vf->priv->zmem);
    158158      if(r != LZO_E_OK) {
    159159        mp_msg(MSGT_VFILTER,MSGL_ERR,"LZO compress error\n");
    160160        zlen = 0;
  • libmpcodecs/vf_fspp.c

    diff -Naur main2/libmpcodecs/vf_fspp.c main/libmpcodecs/vf_fspp.c
    old new  
    546546
    547547        if(qp_tab || vf->priv->qp){
    548548            filter(vf->priv, dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0],
    549                    mpi->w, mpi->h, qp_tab, mpi->qstride, 1);
     549                   mpi->w, mpi->h, (unsigned char *)qp_tab, mpi->qstride, 1);
    550550            filter(vf->priv, dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1],
    551                    mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, qp_tab, mpi->qstride, 0);
     551                   mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, (unsigned char *)qp_tab, mpi->qstride, 0);
    552552            filter(vf->priv, dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2],
    553                    mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, qp_tab, mpi->qstride, 0);
     553                   mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, (unsigned char *)qp_tab, mpi->qstride, 0);
    554554        }else{
    555555            memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h, dmpi->stride[0], mpi->stride[0]);
    556556            memcpy_pic(dmpi->planes[1], mpi->planes[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, dmpi->stride[1], mpi->stride[1]);
  • libmpcodecs/vf_pp7.c

    diff -Naur main2/libmpcodecs/vf_pp7.c main/libmpcodecs/vf_pp7.c
    old new  
    385385
    386386    vf->priv->mpeg2= mpi->qscale_type;
    387387    if(mpi->qscale || vf->priv->qp){
    388         filter(vf->priv, dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, mpi->qscale, mpi->qstride, 1);
    389         filter(vf->priv, dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, mpi->qscale, mpi->qstride, 0);
    390         filter(vf->priv, dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, mpi->qscale, mpi->qstride, 0);
     388        filter(vf->priv, dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, (unsigned char *)mpi->qscale, mpi->qstride, 1);
     389        filter(vf->priv, dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, (unsigned char *)mpi->qscale, mpi->qstride, 0);
     390        filter(vf->priv, dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, (unsigned char *)mpi->qscale, mpi->qstride, 0);
    391391    }else{
    392392        memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h, dmpi->stride[0], mpi->stride[0]);
    393393        memcpy_pic(dmpi->planes[1], mpi->planes[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, dmpi->stride[1], mpi->stride[1]);
  • libmpcodecs/vf_pp.c

    diff -Naur main2/libmpcodecs/vf_pp.c main/libmpcodecs/vf_pp.c
    old new  
    129129        pp_postprocess(mpi->planes           ,mpi->stride,
    130130                    vf->dmpi->planes,vf->dmpi->stride,
    131131                    (mpi->w+7)&(~7),mpi->h,
    132                     mpi->qscale, mpi->qstride,
     132                    (signed char *)mpi->qscale, mpi->qstride,
    133133                    vf->priv->ppMode[ vf->priv->pp ], vf->priv->context,
    134134#ifdef PP_PICT_TYPE_QP2
    135135                    mpi->pict_type | (mpi->qscale_type ? PP_PICT_TYPE_QP2 : 0));
  • libmpcodecs/vf_remove_logo.c

    diff -Naur main2/libmpcodecs/vf_remove_logo.c main/libmpcodecs/vf_remove_logo.c
    old new  
    357357                           and to get us max_mask_size later on. */
    358358  int max_mask_size; /* This will record how large a mask the pixel that is the furthest from the edge of the logo
    359359                           (and thus the neediest) is. */
    360   char * current_pixel = mask->pixel; /* This stores the actual pixel data. */
     360  unsigned char * current_pixel = mask->pixel; /* This stores the actual pixel data. */
    361361
    362362  /* First pass, set all non-zero values to 1. After this loop finishes, the data should be considered numeric
    363363     data for the filter, not color data. */
     
    788788
    789789    switch(dmpi->imgfmt){
    790790    case IMGFMT_YV12:
    791           convert_yv12(vf, mpi->planes[0],  mpi->stride[0], mpi, mpi->w, mpi->h,
    792                           dmpi->planes[0], dmpi->stride[0],
     791          convert_yv12(vf, (char *)mpi->planes[0],  mpi->stride[0], mpi, mpi->w, mpi->h,
     792                          (char *)dmpi->planes[0], dmpi->stride[0],
    793793                          mpi->flags & MP_IMGFLAG_DIRECT, ((vf_priv_s *)vf->priv)->filter, 0,
    794794                          ((vf_priv_s *)vf->priv)->bounding_rectangle_posx1, ((vf_priv_s *)vf->priv)->bounding_rectangle_posy1,
    795795                          ((vf_priv_s *)vf->priv)->bounding_rectangle_posx2, ((vf_priv_s *)vf->priv)->bounding_rectangle_posy2);
    796           convert_yv12(vf, mpi->planes[1],  mpi->stride[1], mpi, mpi->w / 2, mpi->h / 2,
    797                           dmpi->planes[1], dmpi->stride[1],
     796          convert_yv12(vf, (char *)mpi->planes[1],  mpi->stride[1], mpi, mpi->w / 2, mpi->h / 2,
     797                          (char *)dmpi->planes[1], dmpi->stride[1],
    798798                          mpi->flags & MP_IMGFLAG_DIRECT, ((vf_priv_s *)vf->priv)->half_size_filter, 1,
    799799                          ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posx1, ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posy1,
    800800                          ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posx2, ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posy2);
    801           convert_yv12(vf, mpi->planes[2],  mpi->stride[2], mpi, mpi->w / 2, mpi->h / 2,
    802                           dmpi->planes[2], dmpi->stride[2],
     801          convert_yv12(vf, (char *)mpi->planes[2],  mpi->stride[2], mpi, mpi->w / 2, mpi->h / 2,
     802                          (char *)dmpi->planes[2], dmpi->stride[2],
    803803                          mpi->flags & MP_IMGFLAG_DIRECT, ((vf_priv_s *)vf->priv)->half_size_filter, 2,
    804804                          ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posx1, ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posy1,
    805805                          ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posx2, ((vf_priv_s *)vf->priv)->bounding_rectangle_half_size_posy2);
  • libmpcodecs/vf_spp.c

    diff -Naur main2/libmpcodecs/vf_spp.c main/libmpcodecs/vf_spp.c
    old new  
    491491                qp_tab= mpi->qscale;
    492492
    493493            if(qp_tab || vf->priv->qp){
    494                 filter(vf->priv, dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, qp_tab, mpi->qstride, 1);
    495                 filter(vf->priv, dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, qp_tab, mpi->qstride, 0);
    496                 filter(vf->priv, dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, qp_tab, mpi->qstride, 0);
     494                filter(vf->priv, dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, (unsigned char *)qp_tab, mpi->qstride, 1);
     495                filter(vf->priv, dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, (unsigned char *)qp_tab, mpi->qstride, 0);
     496                filter(vf->priv, dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, (unsigned char *)qp_tab, mpi->qstride, 0);
    497497            }else{
    498498                memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h, dmpi->stride[0], mpi->stride[0]);
    499499                memcpy_pic(dmpi->planes[1], mpi->planes[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, dmpi->stride[1], mpi->stride[1]);
  • libmpcodecs/vf_uspp.c

    diff -Naur main2/libmpcodecs/vf_uspp.c main/libmpcodecs/vf_uspp.c
    old new  
    292292    vf->priv->mpeg2= mpi->qscale_type;
    293293    if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){
    294294        if(mpi->qscale || vf->priv->qp){
    295             filter(vf->priv, dmpi->planes, mpi->planes, dmpi->stride, mpi->stride, mpi->w, mpi->h, mpi->qscale, mpi->qstride);
     295            filter(vf->priv, dmpi->planes, mpi->planes, dmpi->stride, mpi->stride, mpi->w, mpi->h, (unsigned char *)mpi->qscale, mpi->qstride);
    296296        }else{
    297297            memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h, dmpi->stride[0], mpi->stride[0]);
    298298            memcpy_pic(dmpi->planes[1], mpi->planes[1], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, dmpi->stride[1], mpi->stride[1]);
  • libmpdemux/ai_alsa1x.c

    diff -Naur main2/libmpdemux/ai_alsa1x.c main/libmpdemux/ai_alsa1x.c
    old new  
    4444
    4545    err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels);
    4646    if (err < 0) {
    47         snd_pcm_hw_params_get_channels(params, &ai->channels);
     47        snd_pcm_hw_params_get_channels(params, (unsigned int *)(&ai->channels));
    4848        mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableChanCount,
    4949               ai->channels);
    5050    } else {
     
    6262    dir = 0;
    6363    ai->alsa.buffer_time = 1000000;
    6464    err = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params,
    65                                                  &ai->alsa.buffer_time, &dir);
     65                                                 (unsigned int *)(&ai->alsa.buffer_time), &dir);
    6666    if (err < 0) {
    6767        mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime);
    6868    }
     
    7070    dir = 0;
    7171    ai->alsa.period_time = ai->alsa.buffer_time / 4;
    7272    err = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params,
    73                                                  &ai->alsa.period_time, &dir);
     73                                                 (unsigned int *)(&ai->alsa.period_time), &dir);
    7474    if (err < 0) {
    7575        mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime);
    7676    }
  • libmpdemux/asfheader.c

    diff -Naur main2/libmpdemux/asfheader.c main/libmpdemux/asfheader.c
    old new  
    124124
    125125int asf_check_header(demuxer_t *demuxer){
    126126  unsigned char asfhdrguid[16]={0x30,0x26,0xB2,0x75,0x8E,0x66,0xCF,0x11,0xA6,0xD9,0x00,0xAA,0x00,0x62,0xCE,0x6C};
    127   stream_read(demuxer->stream,(char*) &asfh,sizeof(asfh)); // header obj
     127  stream_read(demuxer->stream,(unsigned char*) &asfh,sizeof(asfh)); // header obj
    128128  le2me_ASF_header_t(&asfh);                    // swap to machine endian
    129129//  for(i=0;i<16;i++) printf(" %02X",temp[i]);printf("\n");
    130130//  for(i=0;i<16;i++) printf(" %02X",asfhdrguid[i]);printf("\n");
     
    176176            hdr_len);
    177177    return 0;
    178178  }
    179   stream_read(demuxer->stream, hdr, hdr_len);
     179  stream_read(demuxer->stream, (unsigned char*)(hdr), hdr_len);
    180180  if (stream_eof(demuxer->stream)) {
    181181    mp_msg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_EOFWhileReadingHeader);
    182182    goto err_out;
     
    364364  free(hdr);
    365365  hdr = NULL;
    366366  start = stream_tell(demuxer->stream); // start of first data chunk
    367   stream_read(demuxer->stream, guid_buffer, 16);
     367  stream_read(demuxer->stream, (unsigned char*)(guid_buffer), 16);
    368368  if (memcmp(guid_buffer, asf_data_chunk_guid, 16) != 0) {
    369369    mp_msg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_NoDataChunkAfterHeader);
    370370    return 0;
    371371  }
    372372  // read length of chunk
    373   stream_read(demuxer->stream, (char *)&data_len, sizeof(data_len));
     373  stream_read(demuxer->stream, (unsigned char *)&data_len, sizeof(data_len));
    374374  data_len = le2me_64(data_len);
    375375  demuxer->movi_start = stream_tell(demuxer->stream) + 26;
    376376  demuxer->movi_end = start + data_len;
  • libmpdemux/asf_mmst_streaming.c

    diff -Naur main2/libmpdemux/asf_mmst_streaming.c main/libmpdemux/asf_mmst_streaming.c
    old new  
    167167      return;
    168168    }
    169169
    170     command = get_32 (data, 36) & 0xFFFF;
     170    command = get_32 ((unsigned char*)data, 36) & 0xFFFF;
    171171
    172172    if (command == 0x1b)
    173173      send_command (s, 0x1b, 0, 0, 0, data);
     
    209209  header_len = 0;
    210210
    211211  while (1) {
    212     if (!get_data (s, pre_header, 8)) {
     212    if (!get_data (s, (char*)pre_header, 8)) {
    213213      mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_PreHeaderReadFailed);
    214214      return 0;
    215215    }
     
    226226        return 0;
    227227      }
    228228
    229       if (!get_data (s, &header[header_len], packet_len)) {
     229      if (!get_data (s, (char*)(&header[header_len]), packet_len)) {
    230230        mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_HeaderDataReadFailed);
    231231        return 0;
    232232      }
     
    236236      if ( (header[header_len-1] == 1) && (header[header_len-2]==1)) {
    237237       
    238238
    239      if( streaming_bufferize( streaming_ctrl, header, header_len )<0 ) {
     239     if( streaming_bufferize( streaming_ctrl, (char*)header, header_len )<0 ) {
    240240                                return -1;
    241241         }
    242242
     
    272272        return 0;
    273273      }
    274274     
    275       command = get_32 (data, 24) & 0xFFFF;
     275      command = get_32 ((unsigned char*)data, 24) & 0xFFFF;
    276276     
    277277//      mp_msg(MSGT_NETWORK,MSGL_INFO,"command: %02x\n", command);
    278278     
     
    377377  unsigned char  pre_header[8];
    378378  char           data[BUF_SIZE];
    379379
    380   if (!get_data (s, pre_header, 8)) {
     380  if (!get_data (s, (char*)pre_header, 8)) {
    381381    mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_PreHeaderReadFailed);
    382382    return 0;
    383383  }
     
    435435      return -1;
    436436    }
    437437
    438     command = get_32 (data, 24) & 0xFFFF;
     438    command = get_32 ((unsigned char*)data, 24) & 0xFFFF;
    439439
    440440//    mp_msg(MSGT_NETWORK,MSGL_INFO,"\ncommand packet detected, len=%d  cmd=0x%X\n", packet_len, command);
    441441
  • libmpdemux/aviheader.c

    diff -Naur main2/libmpdemux/aviheader.c main/libmpdemux/aviheader.c
    old new  
    182182    case mmioFOURCC('I','D','I','T'): hdr="Digitization Time";break;
    183183
    184184    case ckidAVIMAINHDR:          // read 'avih'
    185       stream_read(demuxer->stream,(char*) &avih,MIN(size2,sizeof(avih)));
     185      stream_read(demuxer->stream,(unsigned char*) &avih,MIN(size2,sizeof(avih)));
    186186      le2me_MainAVIHeader(&avih); // swap to machine endian
    187187      chunksize-=MIN(size2,sizeof(avih));
    188188      if(verbose>0) print_avih(&avih); // else print_avih_flags(&avih);
    189189      break;
    190190    case ckidSTREAMHEADER: {      // read 'strh'
    191191      AVIStreamHeader h;
    192       stream_read(demuxer->stream,(char*) &h,MIN(size2,sizeof(h)));
     192      stream_read(demuxer->stream,(unsigned char*) &h,MIN(size2,sizeof(h)));
    193193      le2me_AVIStreamHeader(&h);  // swap to machine endian
    194194      chunksize-=MIN(size2,sizeof(h));
    195195      ++stream_id;
     
    220220      s->bIndexType = stream_read_char(demuxer->stream);
    221221      s->nEntriesInUse = stream_read_dword_le(demuxer->stream);
    222222      *(uint32_t *)s->dwChunkId = stream_read_dword_le(demuxer->stream);
    223       stream_read(demuxer->stream, (char *)s->dwReserved, 3*4);
     223      stream_read(demuxer->stream, (unsigned char *)s->dwReserved, 3*4);
    224224      memset(s->dwReserved, 0, 3*4);
    225225         
    226226      print_avisuperindex_chunk(s);
     
    249249        sh_video->bih=calloc((chunksize<sizeof(BITMAPINFOHEADER))?sizeof(BITMAPINFOHEADER):chunksize,1);
    250250//        sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize);
    251251        mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader,chunksize,sizeof(BITMAPINFOHEADER));
    252         stream_read(demuxer->stream,(char*) sh_video->bih,chunksize);
     252        stream_read(demuxer->stream,(unsigned char*) sh_video->bih,chunksize);
    253253        le2me_BITMAPINFOHEADER(sh_video->bih);  // swap to machine endian
    254254        // fixup MS-RLE header (seems to be broken for <256 color files)
    255255        if(sh_video->bih->biCompression<=1 && sh_video->bih->biSize==40)
     
    302302        sh_audio->wf=calloc(wf_size,1);
    303303//        sh_audio->wf=malloc(chunksize); memset(sh_audio->wf,0,chunksize);
    304304        mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt,chunksize,sizeof(WAVEFORMATEX));
    305         stream_read(demuxer->stream,(char*) sh_audio->wf,chunksize);
     305        stream_read(demuxer->stream,(unsigned char*) sh_audio->wf,chunksize);
    306306        le2me_WAVEFORMATEX(sh_audio->wf);
    307307        if (sh_audio->wf->cbSize != 0 &&
    308308            wf_size < sizeof(WAVEFORMATEX)+sh_audio->wf->cbSize) {
     
    356356        priv->idx_size,avih.dwTotalFrames, (int64_t)stream_tell(demuxer->stream));
    357357      priv->idx=malloc(priv->idx_size<<4);
    358358//      printf("\nindex to %p !!!!! (priv=%p)\n",priv->idx,priv);
    359       stream_read(demuxer->stream,(char*)priv->idx,priv->idx_size<<4);
     359      stream_read(demuxer->stream,(unsigned char*)priv->idx,priv->idx_size<<4);
    360360      for (i = 0; i < priv->idx_size; i++) {    // swap index to machine endian
    361361        AVIINDEXENTRY *entry=(AVIINDEXENTRY*)priv->idx + i;
    362362        le2me_AVIINDEXENTRY(entry);
     
    376376        char riff_type[4];
    377377
    378378        mp_msg(MSGT_HEADER, MSGL_V, MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr);
    379         stream_read(demuxer->stream, riff_type, sizeof riff_type);
     379        stream_read(demuxer->stream, (unsigned char*)(riff_type), sizeof riff_type);
    380380        if (strncmp(riff_type, "AVIX", sizeof riff_type))
    381381            mp_msg(MSGT_HEADER, MSGL_WARN, MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr);
    382382        else {
     
    401401    if(size2==3)
    402402      chunksize=1; // empty
    403403    else {
    404       char buf[256];
     404      unsigned char buf[256];
    405405      int len=(size2<250)?size2:250;
    406406      stream_read(demuxer->stream,buf,len);
    407407      chunksize-=len;
    408408      buf[len]=0;
    409409      mp_msg(MSGT_HEADER,MSGL_V,"%-10s: %s\n",hdr,buf);
    410       demux_info_add(demuxer, hdr, buf);
     410      demux_info_add(demuxer, hdr, (char *)buf);
    411411    }
    412412  }
    413413  mp_msg(MSGT_HEADER,MSGL_DBG2,"list_end=0x%"PRIX64"  pos=0x%"PRIX64"  chunksize=0x%"PRIX64"  next=0x%"PRIX64"\n",
     
    454454            int ret1, ret2;
    455455            memset(&cx->stdidx[j], 0, 32);
    456456            ret1 = stream_seek(demuxer->stream, (off_t)cx->aIndex[j].qwOffset);
    457             ret2 = stream_read(demuxer->stream, (char *)&cx->stdidx[j], 32);
     457            ret2 = stream_read(demuxer->stream, (unsigned char *)&cx->stdidx[j], 32);
    458458            if (ret1 != 1 || ret2 != 32 || cx->stdidx[j].nEntriesInUse==0) {
    459459                // this is a broken file (probably incomplete) let the standard
    460460                // gen_index routine handle this
     
    468468            print_avistdindex_chunk(&cx->stdidx[j]);
    469469            priv->idx_size += cx->stdidx[j].nEntriesInUse;
    470470            cx->stdidx[j].aIndex = malloc(cx->stdidx[j].nEntriesInUse*sizeof(avistdindex_entry));
    471             stream_read(demuxer->stream, (char *)cx->stdidx[j].aIndex,
     471            stream_read(demuxer->stream, (unsigned char *)cx->stdidx[j].aIndex,
    472472                    cx->stdidx[j].nEntriesInUse*sizeof(avistdindex_entry));
    473473            for (k=0;k<cx->stdidx[j].nEntriesInUse; k++)
    474474                le2me_AVISTDIDXENTRY(&cx->stdidx[j].aIndex[k]);
  • libmpdemux/demux_audio.c

    diff -Naur main2/libmpdemux/demux_audio.c main/libmpdemux/demux_audio.c
    old new  
    222222    free(mp3_found);
    223223    mp3_found = NULL;
    224224    if(s->end_pos) {
    225       char tag[4];
     225      unsigned char tag[4];
    226226      stream_seek(s,s->end_pos-128);
    227227      stream_read(s,tag,3);
    228228      tag[3] = '\0';
    229       if(strcmp(tag,"TAG"))
     229      if(strcmp((char *)tag,"TAG"))
    230230        demuxer->movi_end = s->end_pos;
    231231      else {
    232         char buf[31];
     232        unsigned char buf[31];
    233233        uint8_t g;
    234234        demuxer->movi_end = stream_tell(s)-3;
    235235        stream_read(s,buf,30);
    236236        buf[30] = '\0';
    237         demux_info_add(demuxer,"Title",buf);
     237        demux_info_add(demuxer,"Title",(char *)buf);
    238238        stream_read(s,buf,30);
    239239        buf[30] = '\0';
    240         demux_info_add(demuxer,"Artist",buf);
     240        demux_info_add(demuxer,"Artist",(char *)buf);
    241241        stream_read(s,buf,30);
    242242        buf[30] = '\0';
    243         demux_info_add(demuxer,"Album",buf);
     243        demux_info_add(demuxer,"Album",(char *)buf);
    244244        stream_read(s,buf,4);
    245245        buf[4] = '\0';
    246         demux_info_add(demuxer,"Year",buf);
     246        demux_info_add(demuxer,"Year",(char *)buf);
    247247        stream_read(s,buf,30);
    248248        buf[30] = '\0';
    249         demux_info_add(demuxer,"Comment",buf);
     249        demux_info_add(demuxer,"Comment",(char *)buf);
    250250        if(buf[28] == 0 && buf[29] != 0) {
    251251          uint8_t trk = (uint8_t)buf[29];
    252           sprintf(buf,"%d",trk);
    253           demux_info_add(demuxer,"Track",buf);
     252          sprintf((char *)buf,"%d",trk);
     253          demux_info_add(demuxer,"Track",(char *)buf);
    254254        }
    255255        g = stream_read_char(s);
    256256        demux_info_add(demuxer,"Genre",genres[g]);
     
    285285      if (l < w->cbSize) {
    286286        mp_msg(MSGT_DEMUX,MSGL_ERR,"[demux_audio] truncated extradata (%d < %d)\n",
    287287        l,w->cbSize);
    288         stream_read(s,(char*)((char*)(w)+sizeof(WAVEFORMATEX)),l);
     288        stream_read(s,(unsigned char*)((char*)(w)+sizeof(WAVEFORMATEX)),l);
    289289        l = 0;
    290290      } else {
    291         stream_read(s,(char*)((char*)(w)+sizeof(WAVEFORMATEX)),w->cbSize);
     291        stream_read(s,(unsigned char*)((char*)(w)+sizeof(WAVEFORMATEX)),w->cbSize);
    292292        l -= w->cbSize;
    293293      }
    294294     }
  • libmpdemux/demux_gif.c

    diff -Naur main2/libmpdemux/demux_gif.c main/libmpdemux/demux_gif.c
    old new  
    7878        printf("GIF comment: ");
    7979        while (p != NULL) {
    8080          int length = p[0];
    81           char *comments = p + 1;
     81          unsigned char *comments = p + 1;
    8282          comments[length] = 0;
    8383          printf("%s", comments);
    8484          if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) {
     
    108108  memset(buf, 0, len);
    109109  memset(dp->buffer, 0, len);
    110110 
    111   if (DGifGetLine(gif, buf, len) == GIF_ERROR) {
     111  if (DGifGetLine(gif, (unsigned char *)buf, len) == GIF_ERROR) {
    112112    PrintGifError();
    113113    return 0; // oops
    114114  }
     
    129129
    130130    for (y = 0; y < gif->Image.Height; y++) {
    131131      unsigned char *drow = dp->buffer;
    132       unsigned char *gbuf = buf + (y * gif->Image.Width);
     132      unsigned char *gbuf = (unsigned char *)buf + (y * gif->Image.Width);
    133133
    134134      drow += gif->Image.Width * (y + gif->Image.Top);
    135135      drow += gif->Image.Left;
  • libmpdemux/demux_mkv.c

    diff -Naur main2/libmpdemux/demux_mkv.c main/libmpdemux/demux_mkv.c
    old new  
    594594          *dest = (uint8_t *) malloc (dstlen);
    595595          while (1)
    596596            {
    597               result = lzo1x_decompress_safe (src, *size, *dest, &dstlen,
     597              result = lzo1x_decompress_safe (src, *size, *dest, (unsigned int *)&dstlen,
    598598                                              NULL);
    599599              if (result == LZO_E_OK)
    600600                break;
     
    20382038        continue;
    20392039
    20402040      size = track->private_size;
    2041       m = demux_mkv_decode (track,track->private_data,&buffer,&size,2);
     2041      m = demux_mkv_decode (track,track->private_data,&buffer,(uint32_t *)&size,2);
    20422042      if (buffer && m)
    20432043        {
    20442044          free (track->private_data);
     
    29252925        {
    29262926          sh_audio_t *sh = (sh_audio_t *) ds->sh;
    29272927
    2928           if (block_duration != 0)
     2928         if (block_duration != 0)
    29292929            {
    29302930              sh->i_bps = length * 1000 / block_duration;
    29312931              track->fix_i_bps = 0;
     
    29532953      if (track->subtitle_type != MATROSKA_SUBTYPE_VOBSUB)
    29542954        {
    29552955          if (!mkv_d->v_skip_to_keyframe)
    2956             handle_subtitles (demuxer, track, block, length,
     2956            handle_subtitles (demuxer, track, (char *)block, length,
    29572957                              block_duration, tc);
    29582958          use_this_block = 0;
    29592959        }
     
    29802980              int modified, size = lace_size[i];
    29812981              demux_packet_t *dp;
    29822982              uint8_t *buffer;
    2983               modified = demux_mkv_decode (track, block, &buffer, &size, 1);
     2983              modified = demux_mkv_decode (track, block, &buffer, (uint32_t *)&size, 1);
    29842984              if (buffer)
    29852985                {
    29862986                  dp = new_demux_packet (size);
  • libmpdemux/demux_mov.c

    diff -Naur main2/libmpdemux/demux_mov.c main/libmpdemux/demux_mov.c
    old new  
    12511251              zstrm.zalloc          = (alloc_func)0;
    12521252              zstrm.zfree           = (free_func)0;
    12531253              zstrm.opaque          = (voidpf)0;
    1254               zstrm.next_in         = cmov_buf;
     1254              zstrm.next_in         = (unsigned char *)cmov_buf;
    12551255              zstrm.avail_in        = cmov_sz;
    12561256              zstrm.next_out        = moov_buf;
    12571257              zstrm.avail_out       = moov_sz;
     
    13251325                    {
    13261326                        off_t text_len = stream_read_word(demuxer->stream);
    13271327                        char text[text_len+2+1];
    1328                         stream_read(demuxer->stream, (char *)&text, text_len+2);
     1328                        stream_read(demuxer->stream, (unsigned char *)&text, text_len+2);
    13291329                        text[text_len+2] = 0x0;
    13301330                        switch(udta_id)
    13311331                        {
     
    13961396                                udta_len=udta_size;
    13971397                        {
    13981398                        char dump[udta_len-4];
    1399                         stream_read(demuxer->stream, (char *)&dump, udta_len-4-4);
     1399                        stream_read(demuxer->stream, (unsigned char *)&dump, udta_len-4-4);
    14001400                        udta_size -= udta_len;
    14011401                        }
    14021402                    }
     
    14331433      // read codec data
    14341434      trak->tkdata_len = len;
    14351435      trak->tkdata = malloc(trak->tkdata_len);
    1436       stream_read(demuxer->stream, trak->tkdata, trak->tkdata_len);
     1436      stream_read(demuxer->stream, (unsigned char*) trak->tkdata, trak->tkdata_len);
    14371437/*
    143814380  1 Version
    143914391  3 Flags
     
    14781478      unsigned int comp_mask = stream_read_dword(demuxer->stream);
    14791479      int len = stream_read_char(demuxer->stream);
    14801480      char* str = malloc(len + 1);
    1481       stream_read(demuxer->stream, str, len);
     1481      stream_read(demuxer->stream, (unsigned char*)str, len);
    14821482      str[len] = 0;
    14831483      mp_msg(MSGT_DEMUX, MSGL_V,
    14841484             "MOV: %*sHandler header: %.4s/%.4s (%.4s) %s\n", level, "",
     
    18191819                        char buf2[newlen];
    18201820
    18211821                        len-=4;
    1822                         stream_read(demuxer->stream, buf, len);
     1822                        stream_read(demuxer->stream, (unsigned char*)buf, len);
    18231823
    18241824                        zstrm.zalloc          = (alloc_func)0;
    18251825                        zstrm.zfree           = (free_func)0;
    18261826                        zstrm.opaque          = (voidpf)0;
    1827                         zstrm.next_in         = buf;
     1827                        zstrm.next_in         = (unsigned char*)buf;
    18281828                        zstrm.avail_in        = len;
    1829                         zstrm.next_out        = buf2;
     1829                        zstrm.next_out        = (unsigned char*)buf2;
    18301830                        zstrm.avail_out       = newlen;
    18311831
    18321832                        zret = inflateInit(&zstrm);
     
    18421842                    }
    18431843                    {
    18441844#endif
    1845                         stream_read(demuxer->stream, buf, len);
     1845                        stream_read(demuxer->stream, (unsigned char*)buf, len);
    18461846                        write(fd, buf, len);
    18471847                    }
    18481848                    close(fd);
  • libmpdemux/demux_nsv.c

    diff -Naur main2/libmpdemux/demux_nsv.c main/libmpdemux/demux_nsv.c
    old new  
    177177
    178178        //   bytes 8-11   audio codec fourcc
    179179        // PCM fourcc needs extra parsing for every audio chunk, yet to implement
    180         if((demuxer->audio->id != -2) && strncmp(hdr+8,"NONE", 4)){//&&strncmp(hdr+8,"VLB ", 4)){
     180        if((demuxer->audio->id != -2) && strncmp((char *)hdr+8,"NONE", 4)){//&&strncmp(hdr+8,"VLB ", 4)){
    181181            sh_audio = new_sh_audio ( demuxer, 0 );
    182182            demuxer->audio->sh = sh_audio;
    183183            sh_audio->format=mmioFOURCC(hdr[8],hdr[9],hdr[10],hdr[11]);
     
    188188        // store hdr fps
    189189        priv->fps=hdr[16];
    190190           
    191         if ((demuxer->video->id != -2) && strncmp(hdr+4,"NONE", 4)) {
     191        if ((demuxer->video->id != -2) && strncmp((char *)hdr+4,"NONE", 4)) {
    192192            /* Create a new video stream header */
    193193            sh_video = new_sh_video ( demuxer, 0 );
    194194
  • libmpdemux/demux_nuv.c

    diff -Naur main2/libmpdemux/demux_nuv.c main/libmpdemux/demux_nuv.c
    old new  
    8383
    8484                while(current_time < target_time )
    8585                {       
    86                         if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
     86                        if (stream_read ( demuxer->stream, (unsigned char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
    8787                                return; /* EOF */
    8888                        le2me_rtframeheader(&rtjpeg_frameheader);
    8989
     
    160160        int want_audio = (demuxer->audio)&&(demuxer->audio->id!=-2);
    161161
    162162        demuxer->filepos = orig_pos = stream_tell ( demuxer->stream );
    163         if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
     163        if (stream_read ( demuxer->stream, (unsigned char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
    164164            return 0; /* EOF */
    165165        le2me_rtframeheader(&rtjpeg_frameheader);
    166166
     
    234234  sh_audio_t* sh_audio = demuxer->audio->sh;
    235235
    236236  for (i = 0; i < 2; ++i) {
    237     if (stream_read(demuxer->stream, (char*)&rtjpeg_frameheader,
     237    if (stream_read(demuxer->stream, (unsigned char*)&rtjpeg_frameheader,
    238238              sizeof(rtjpeg_frameheader)) < sizeof(rtjpeg_frameheader))
    239239      goto out;
    240240    le2me_rtframeheader(&rtjpeg_frameheader);
     
    252252    goto out;
    253253  }
    254254
    255   if (stream_read(demuxer->stream, (char*)&ext, sizeof(ext)) < sizeof(ext))
     255  if (stream_read(demuxer->stream, (unsigned char*)&ext, sizeof(ext)) < sizeof(ext))
    256256    goto out;
    257257  le2me_extendeddata(&ext);
    258258
     
    325325        stream_reset(demuxer->stream);
    326326        stream_seek(demuxer->stream, 0);
    327327
    328         stream_read ( demuxer->stream, (char*)& rtjpeg_fileheader, sizeof(rtjpeg_fileheader) );
     328        stream_read ( demuxer->stream, (unsigned char*)& rtjpeg_fileheader, sizeof(rtjpeg_fileheader) );
    329329        le2me_rtfileheader(&rtjpeg_fileheader);
    330330
    331331        /* no video */
     
    414414
    415415        mp_msg ( MSGT_DEMUX, MSGL_V, "Checking for NuppelVideo\n" );
    416416
    417         if(stream_read(demuxer->stream,(char*)&ns,sizeof(ns)) != sizeof(ns))
     417        if(stream_read(demuxer->stream,(unsigned char*)&ns,sizeof(ns)) != sizeof(ns))
    418418                return 0;
    419419
    420420        if ( strncmp ( ns.finfo, "NuppelVideo", 12 ) &&
  • libmpdemux/demux_ogg.c

    diff -Naur main2/libmpdemux/demux_ogg.c main/libmpdemux/demux_ogg.c
    old new  
    233233  int lcv;
    234234  int line_pos = 0;
    235235  int ignoring = 0;
    236   char *packet = pack->packet;
     236  unsigned char *packet = pack->packet;
    237237
    238238  mp_msg(MSGT_DEMUX,MSGL_DBG2,"\ndemux_ogg_add_sub %02X %02X %02X '%s'\n",
    239239      (unsigned char)packet[0],
     
    637637    }
    638638    if(np <= 0) { // We need more data
    639639      char* buf = ogg_sync_buffer(sync,BLOCK_SIZE);
    640       int len = stream_read(s,buf,BLOCK_SIZE);
     640      int len = stream_read(s,(unsigned char *)buf,BLOCK_SIZE);
    641641      if(len == 0 && s->eof)
    642642        break;
    643643      ogg_sync_wrote(sync,len);
     
    692692    np = ogg_sync_pageout(sync,page);
    693693    if(np <= 0) { // We need more data
    694694      char* buf = ogg_sync_buffer(sync,BLOCK_SIZE);
    695       int len = stream_read(s,buf,BLOCK_SIZE);
     695      int len = stream_read(s,(unsigned char *)buf,BLOCK_SIZE);
    696696      if(len == 0 && s->eof) {
    697697        mp_msg(MSGT_DEMUX,MSGL_ERR,"EOF while trying to get the first page !!!!\n");
    698698        break;
     
    881881    if(np == 0) {
    882882      int len;
    883883      buf = ogg_sync_buffer(sync,BLOCK_SIZE);
    884       len = stream_read(s,buf,BLOCK_SIZE);     
     884      len = stream_read(s,(unsigned char *)buf,BLOCK_SIZE);     
    885885      if(len == 0 && s->eof) {
    886886        goto err_out;
    887887      }
     
    920920    demux_aid_vid_mismatch = 1; // don't identify in new_sh_* since ids don't match
    921921
    922922    // Check for Vorbis
    923     if(pack.bytes >= 7 && ! strncmp(&pack.packet[1],"vorbis", 6) ) {
     923    if(pack.bytes >= 7 && ! strncmp((char *)&pack.packet[1],"vorbis", 6) ) {
    924924      sh_a = new_sh_audio(demuxer,ogg_d->num_sub);
    925925      sh_a->format = FOURCC_VORBIS;
    926926      ogg_d->subs[ogg_d->num_sub].vorbis = 1;
     
    929929      ogg_d->subs[ogg_d->num_sub].id = n_audio;
    930930      n_audio++;
    931931      mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: audio (Vorbis), -aid %d\n",ogg_d->num_sub,n_audio-1);
    932     } else if (pack.bytes >= 80 && !strncmp(pack.packet,"Speex", 5)) {
     932    } else if (pack.bytes >= 80 && !strncmp((char *)pack.packet,"Speex", 5)) {
    933933      sh_a = new_sh_audio(demuxer, ogg_d->num_sub);
    934934      sh_a->wf = (WAVEFORMATEX*)calloc(1, sizeof(WAVEFORMATEX) + pack.bytes);
    935935      sh_a->format = FOURCC_SPEEX;
     
    953953
    954954      // check for Theora
    955955#   ifdef HAVE_OGGTHEORA
    956     } else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) {
     956    } else if (pack.bytes >= 7 && !strncmp ((char *)&pack.packet[1], "theora", 6)) {
    957957        int errorCode = 0;
    958958        theora_info inf;
    959959        theora_comment cc;
     
    10131013#   endif /* HAVE_FLAC */
    10141014
    10151015      /// Check for old header
    1016     } else if(pack.bytes >= 142 && ! strncmp(&pack.packet[1],"Direct Show Samples embedded in Ogg",35) ) {
     1016    } else if(pack.bytes >= 142 && ! strncmp((char *)&pack.packet[1],"Direct Show Samples embedded in Ogg",35) ) {
    10171017
    10181018       // Old video header
    10191019      if(get_uint32 (pack.packet+96) == 0x05589f80 && pack.bytes >= 184) {
     
    12871287            }
    12881288            /// We need more data
    12891289            buf = ogg_sync_buffer(sync,BLOCK_SIZE);         
    1290             len = stream_read(s,buf,BLOCK_SIZE);
     1290            len = stream_read(s,(unsigned char *)buf,BLOCK_SIZE);
    12911291            if(len == 0 && s->eof) {
    12921292              mp_msg(MSGT_DEMUX,MSGL_DBG2,"Ogg : Stream EOF !!!!\n");
    12931293              return 0;
     
    15311531      ogg_d->pos -= np;
    15321532    if(np <= 0) { // We need more data
    15331533      char* buf = ogg_sync_buffer(sync,BLOCK_SIZE);
    1534       int len = stream_read(demuxer->stream,buf,BLOCK_SIZE);
     1534      int len = stream_read(demuxer->stream,(unsigned char *)buf,BLOCK_SIZE);
    15351535       if(len == 0 && demuxer->stream->eof) {
    15361536        mp_msg(MSGT_DEMUX,MSGL_V,"EOF while trying to seek !!!!\n");
    15371537        return;
  • libmpdemux/demux_realaud.c

    diff -Naur main2/libmpdemux/demux_realaud.c main/libmpdemux/demux_realaud.c
    old new  
    225225
    226226        if ((i = stream_read_char(demuxer->stream)) != 0) {
    227227                buf = malloc(i+1);
    228                 stream_read(demuxer->stream, buf, i);
     228                stream_read(demuxer->stream, (unsigned char*)buf, i);
    229229                buf[i] = 0;
    230230                demux_info_add(demuxer, "Title", buf);
    231231                free(buf);
    232232        }
    233233        if ((i = stream_read_char(demuxer->stream)) != 0) {
    234234                buf = malloc(i+1);
    235                 stream_read(demuxer->stream, buf, i);
     235                stream_read(demuxer->stream, (unsigned char*)buf, i);
    236236                buf[i] = 0;
    237237                demux_info_add(demuxer, "Author", buf);
    238238                free(buf);
    239239        }
    240240        if ((i = stream_read_char(demuxer->stream)) != 0) {
    241241                buf = malloc(i+1);
    242                 stream_read(demuxer->stream, buf, i);
     242                stream_read(demuxer->stream, (unsigned char*)buf, i);
    243243                buf[i] = 0;
    244244                demux_info_add(demuxer, "Copyright", buf);
    245245                free(buf);
     
    247247
    248248        if ((i = stream_read_char(demuxer->stream)) != 0) {
    249249                buf = malloc(i+1);
    250                 stream_read(demuxer->stream, buf, i);
     250                stream_read(demuxer->stream, (unsigned char*)buf, i);
    251251                buf[i] = 0;
    252252                demux_info_add(demuxer, "Comment", buf);
    253253                free(buf);
  • libmpdemux/demux_real.c

    diff -Naur main2/libmpdemux/demux_real.c main/libmpdemux/demux_real.c
    old new  
    132132    else
    133133        len = stream_read_word(demuxer->stream);
    134134
    135     stream_read(demuxer->stream, buf, (len > buf_size) ? buf_size : len);
     135    stream_read(demuxer->stream, (unsigned char *)buf, (len > buf_size) ? buf_size : len);
    136136    if (len > buf_size)
    137137        stream_skip(demuxer->stream, len-buf_size);
    138138
     
    11611161                if (len > 0)
    11621162                {
    11631163                    buf = malloc(len+1);
    1164                     stream_read(demuxer->stream, buf, len);
     1164                    stream_read(demuxer->stream, (unsigned char*)buf, len);
    11651165                    buf[len] = 0;
    11661166                    demux_info_add(demuxer, "name", buf);
    11671167                    free(buf);
     
    11711171                if (len > 0)
    11721172                {
    11731173                    buf = malloc(len+1);
    1174                     stream_read(demuxer->stream, buf, len);
     1174                    stream_read(demuxer->stream, (unsigned char*)buf, len);
    11751175                    buf[len] = 0;
    11761176                    demux_info_add(demuxer, "author", buf);
    11771177                    free(buf);
     
    11811181                if (len > 0)
    11821182                {
    11831183                    buf = malloc(len+1);
    1184                     stream_read(demuxer->stream, buf, len);
     1184                    stream_read(demuxer->stream, (unsigned char*)buf, len);
    11851185                    buf[len] = 0;
    11861186                    demux_info_add(demuxer, "copyright", buf);
    11871187                    free(buf);
     
    11911191                if (len > 0)
    11921192                {
    11931193                    buf = malloc(len+1);
    1194                     stream_read(demuxer->stream, buf, len);
     1194                    stream_read(demuxer->stream, (unsigned char*)buf, len);
    11951195                    buf[len] = 0;
    11961196                    demux_info_add(demuxer, "comment", buf);
    11971197                    free(buf);
     
    12231223//              skip_str(1, demuxer);   /* stream description (name) */
    12241224                if ((len = stream_read_char(demuxer->stream)) > 0) {
    12251225                    descr = malloc(len+1);
    1226                 stream_read(demuxer->stream, descr, len);
     1226                stream_read(demuxer->stream, (unsigned char*)descr, len);
    12271227                    descr[len] = 0;
    12281228                    printf("Stream description: %s\n", descr);
    12291229                    free(descr);
     
    12311231//              skip_str(1, demuxer);   /* mimetype */
    12321232                if ((len = stream_read_char(demuxer->stream)) > 0) {
    12331233                    mimet = malloc(len+1);
    1234                 stream_read(demuxer->stream, mimet, len);
     1234                stream_read(demuxer->stream, (unsigned char*)mimet, len);
    12351235                    mimet[len] = 0;
    12361236                    printf("Stream mimetype: %s\n", mimet);
    12371237                }
     
    12841284                    // Name, author, (c) are also in CONT tag
    12851285                    if ((i = stream_read_char(demuxer->stream)) != 0) {
    12861286                      buft = malloc(i+1);
    1287                       stream_read(demuxer->stream, buft, i);
     1287                      stream_read(demuxer->stream, (unsigned char*)buft, i);
    12881288                      buft[i] = 0;
    12891289                      demux_info_add(demuxer, "Name", buft);
    12901290                      free(buft);
    12911291                    }
    12921292                    if ((i = stream_read_char(demuxer->stream)) != 0) {
    12931293                      buft = malloc(i+1);
    1294                       stream_read(demuxer->stream, buft, i);
     1294                      stream_read(demuxer->stream, (unsigned char*)buft, i);
    12951295                      buft[i] = 0;
    12961296                      demux_info_add(demuxer, "Author", buft);
    12971297                      free(buft);
    12981298                    }
    12991299                    if ((i = stream_read_char(demuxer->stream)) != 0) {
    13001300                      buft = malloc(i+1);
    1301                       stream_read(demuxer->stream, buft, i);
     1301                      stream_read(demuxer->stream, (unsigned char*)buft, i);
    13021302                      buft[i] = 0;
    13031303                      demux_info_add(demuxer, "Copyright", buft);
    13041304                      free(buft);
     
    13601360                    if (version == 5)
    13611361                    {
    13621362                        stream_skip(demuxer->stream, 4);  // "genr"
    1363                         stream_read(demuxer->stream, buf, 4); // fourcc
     1363                        stream_read(demuxer->stream, (unsigned char*)buf, 4); // fourcc
    13641364                        buf[4] = 0;
    13651365                    }
    13661366                    else
     
    14111411                            codecdata_length=stream_read_dword(demuxer->stream);
    14121412                            sh->wf->cbSize = codecdata_length;
    14131413                            sh->wf = realloc(sh->wf, sizeof(WAVEFORMATEX)+sh->wf->cbSize);
    1414                             stream_read(demuxer->stream, ((char*)(sh->wf+1)), codecdata_length); // extras
     1414                            stream_read(demuxer->stream, ((unsigned char*)(sh->wf+1)), codecdata_length); // extras
    14151415                if ((sh->format == MKTAG('a', 't', 'r', 'c')) ||
    14161416                    (sh->format == MKTAG('c', 'o', 'o', 'k')))
    14171417                            sh->wf->nBlockAlign = sub_packet_size;
  • libmpdemux/demux_smjpeg.c

    diff -Naur main2/libmpdemux/demux_smjpeg.c main/libmpdemux/demux_smjpeg.c
    old new  
    3131   
    3232    if (stream_read_word(demuxer->stream) == 0xA)
    3333    {
    34         stream_read(demuxer->stream, buf, 6);
     34        stream_read(demuxer->stream, (unsigned char *)buf, 6);
    3535        buf[7] = 0;
    3636   
    3737        if (strncmp("SMJPEG", buf, 6)) {
  • libmpdemux/demux_ts.c

    diff -Naur main2/libmpdemux/demux_ts.c main/libmpdemux/demux_ts.c
    old new  
    443443                                continue;
    444444
    445445                        mp_msg(MSGT_DEMUXER, MSGL_V, "CMP LANG %s AND %s, pids: %d %d\n",pmt->es[j].lang, lang, pmt->es[j].pid, pid);
    446                         if(strncmp(pmt->es[j].lang, lang, 3) == 0)
     446                        if(strncmp((char *)pmt->es[j].lang, lang, 3) == 0)
    447447                        {
    448448                                return 1;
    449449                        }
     
    516516        {
    517517                if(buf[cnt] == 0x0B && buf[cnt+1] == 0x77)
    518518                {
    519                         frame_length = mp_a52_framesize(&buf[cnt], &srate);
     519                        frame_length = mp_a52_framesize((unsigned char *)(&buf[cnt]), &srate);
    520520                        if(frame_length>=7 && frame_length<=3840)
    521521                        {
    522522                                cnt += frame_length;
     
    21512151                        }
    21522152                        else
    21532153                        {
    2154                                 char *d;
     2154                                unsigned char *d;
    21552155                                memcpy(es->format_descriptor, &ptr[j+2], 4);
    21562156                                es->format_descriptor[4] = 0;
    21572157
     
    27812781                                                {
    27822782                                                        lang = pid_lang_from_pmt(priv, pid);
    27832783                                                        if(lang != NULL)
    2784                                                                 asgn = (strncmp(lang, dvdsub_lang, 3) == 0);
     2784                                                                asgn = (strncmp((char *)lang, dvdsub_lang, 3) == 0);
    27852785                                                        else
    27862786                                                                asgn = 0;
    27872787                                                }
     
    28482848                        mp_msg(MSGT_DEMUX, MSGL_DBG2, "IS_START\n");
    28492849
    28502850                        p = &packet[base];
    2851                         stream_read(stream, p, buf_size);
     2851                        stream_read(stream, (unsigned char*)p, buf_size);
    28522852                        stream_skip(stream, junk);
    28532853
    2854                         len = pes_parse2(p, buf_size, es, pid_type, pmt, pid);
     2854                        len = pes_parse2((unsigned char*)p, buf_size, es, pid_type, pmt, pid);
    28552855                        es->pid = tss->pid;
    28562856                        tss->is_synced |= es->is_synced || rap_flag;
    28572857                       
     
    28722872                                        if(tss->type != UNKNOWN)
    28732873                                        {
    28742874                                                es->size = buf_size;
    2875                                                 es->start = p;
     2875                                                es->start = (unsigned char*)p;
    28762876                                                return 1;
    28772877                                        }
    28782878                                }
     
    29022902                                        {
    29032903                                                len = es->size = buf_size;              //push the whole packet to the fifo
    29042904                                                                                        //(we already learned what it is during the probe phase)
    2905                                                 es->start = p;
     2905                                                es->start = (unsigned char*)p;
    29062906                                        }
    29072907                                        else
    29082908                                                continue;
     
    31823182        ES_stream_t es;
    31833183        ts_priv_t *priv = (ts_priv_t *)demuxer->priv;
    31843184       
    3185         return -ts_parse(demuxer, &es, priv->packet, 0);
     3185        return -ts_parse(demuxer, &es, (unsigned char*)priv->packet, 0);
    31863186}
    31873187
    31883188
  • libmpdemux/demux_ty.c

    diff -Naur main2/libmpdemux/demux_ty.c main/libmpdemux/demux_ty.c
    old new  
    193193         error = 1;
    194194         break;
    195195      }
    196       count = stream_read( demux->stream, header, 512 );
     196      count = stream_read( demux->stream, (unsigned char *)header, 512 );
    197197      if ( count < 512 )
    198198      {
    199199         mp_msg( MSGT_DEMUX, MSGL_DBG3, "Read bad\n" );
  • libmpdemux/demux_viv.c

    diff -Naur main2/libmpdemux/demux_viv.c main/libmpdemux/demux_viv.c
    old new  
    103103    buf = malloc(header_len);
    104104    opt = malloc(header_len);
    105105    param = malloc(header_len);
    106     stream_read(demux->stream, buf, header_len);
     106    stream_read(demux->stream, (unsigned char*)buf, header_len);
    107107    i=0;
    108108    while(i<header_len && buf[i]==0x0D && buf[i+1]==0x0A) i+=2; // skip empty lines
    109109   
     
    267267    // parse header:
    268268    i=0;
    269269    while(i<len && buf[i]==0x0D && buf[i+1]==0x0A) i+=2; // skip empty lines
    270     if(strncmp(buf+i,"Version:Vivo/",13)) return 0; // bad version/type!
     270    if(strncmp((char *)buf+i,"Version:Vivo/",13)) return 0; // bad version/type!
    271271#endif
    272272
    273273#if 0
  • libmpdemux/demux_vqf.c

    diff -Naur main2/libmpdemux/demux_vqf.c main/libmpdemux/demux_vqf.c
    old new  
    1414  char buf[KEYWORD_BYTES];
    1515  stream_t *s;
    1616  s = demuxer->stream;
    17   if(stream_read(s,buf,KEYWORD_BYTES)!=KEYWORD_BYTES)
     17  if(stream_read(s,(unsigned char *)buf,KEYWORD_BYTES)!=KEYWORD_BYTES)
    1818    return 0;
    1919  if(memcmp(buf,"TWIN",KEYWORD_BYTES)==0) return DEMUXER_TYPE_VQF; /*version: 97012000*/
    2020  return 0;
     
    4242  w->wBitsPerSample = 8*sh_audio->samplesize;
    4343  w->cbSize = 0;
    4444  strcpy(hi->ID,"TWIN");
    45   stream_read(s,hi->ID+KEYWORD_BYTES,VERSION_BYTES); /* fourcc+version_id */
     45  stream_read(s,(unsigned char *)hi->ID+KEYWORD_BYTES,VERSION_BYTES); /* fourcc+version_id */
    4646  while(1)
    4747  {
    4848    char chunk_id[4];
    4949    unsigned chunk_size;
    5050    hi->size=chunk_size=stream_read_dword(s); /* include itself */
    51     stream_read(s,chunk_id,4);
     51    stream_read(s,(unsigned char *)chunk_id,4);
    5252    if(*((uint32_t *)&chunk_id[0])==mmioFOURCC('C','O','M','M'))
    5353    {
    5454    char buf[chunk_size-8];
    5555    unsigned i,subchunk_size;
    56     if(stream_read(s,buf,chunk_size-8)!=chunk_size-8) return NULL;
     56    if(stream_read(s,(unsigned char *)buf,chunk_size-8)!=chunk_size-8) return NULL;
    5757    i=0;
    5858    subchunk_size=be2me_32(*((uint32_t *)&buf[0]));
    5959    hi->channelMode=be2me_32(*((uint32_t *)&buf[4]));
  • libmpdemux/demux_y4m.c

    diff -Naur main2/libmpdemux/demux_y4m.c main/libmpdemux/demux_y4m.c
    old new  
    3030   
    3131    mp_msg(MSGT_DEMUX, MSGL_V, "Checking for YUV4MPEG2\n");
    3232   
    33     if(stream_read(demuxer->stream, buf, 9)!=9)
     33    if(stream_read(demuxer->stream, (unsigned char *)buf, 9)!=9)
    3434        return 0;
    3535
    3636    buf[9] = 0;
     
    133133
    134134        stream_skip(demuxer->stream, 8); /* YUV4MPEG */
    135135        stream_skip(demuxer->stream, 1); /* space */
    136         stream_read(demuxer->stream, (char *)&buf[0], 3);
     136        stream_read(demuxer->stream, (unsigned char *)&buf[0], 3);
    137137        buf[3] = 0;
    138138        sh->disp_w = atoi(buf);
    139139        stream_skip(demuxer->stream, 1); /* space */
    140         stream_read(demuxer->stream, (char *)&buf[0], 3);
     140        stream_read(demuxer->stream, (unsigned char *)&buf[0], 3);
    141141        buf[3] = 0;
    142142        sh->disp_h = atoi(buf);
    143143        stream_skip(demuxer->stream, 1); /* space */
    144         stream_read(demuxer->stream, (char *)&buf[0], 1);
     144        stream_read(demuxer->stream, (unsigned char *)&buf[0], 1);
    145145        buf[1] = 0;
    146146        frame_rate_code = atoi(buf);
    147147        stream_skip(demuxer->stream, 1); /* new-line */
  • libmpdemux/ebml.c

    diff -Naur main2/libmpdemux/ebml.c main/libmpdemux/ebml.c
    old new  
    226226    *length = len + l;
    227227
    228228  str = (char *) malloc (len+1);
    229   if (stream_read(s, str, len) != (int) len)
     229  if (stream_read(s, (unsigned char *)str, len) != (int) len)
    230230    {
    231231      free (str);
    232232      return NULL;
  • libmpdemux/http.c

    diff -Naur main2/libmpdemux/http.c main/libmpdemux/http.c
    old new  
    7676  unsigned char info[6] = {0, 0, 0, 0, 0, 0};
    7777  int info_read;
    7878  do {
    79     info_read = my_read(fd, info, 1, sc);
     79    info_read = my_read(fd, (char *)info, 1, sc);
    8080    if (info[0] == 0x00)
    81       info_read = my_read(fd, info, 6, sc);
     81      info_read = my_read(fd, (char *)info, 6, sc);
    8282    else
    83       info_read += my_read(fd, &info[1], 5, sc);
     83      info_read += my_read(fd, (char *)(&info[1]), 5, sc);
    8484    if (info_read != 6) // read error or eof
    8585      return 0;
    8686    // sync byte and reserved flags
     
    108108static void scast_meta_read(int fd, streaming_ctrl_t *sc) {
    109109  unsigned char tmp = 0;
    110110  unsigned metalen;
    111   my_read(fd, &tmp, 1, sc);
     111  my_read(fd, (char *)(&tmp), 1, sc);
    112112  metalen = tmp * 16;
    113113  if (metalen > 0) {
    114114    char *info = (char *)malloc(metalen + 1);
  • libmpdemux/muxer_mpeg.c

    diff -Naur main2/libmpdemux/muxer_mpeg.c main/libmpdemux/muxer_mpeg.c
    old new  
    524524        *(uint32_t *)buff = be2me_32(PACK_HEADER_START_CODE);
    525525        if(priv->mux==MUX_MPEG1)
    526526        {
    527                 write_mpeg_ts(&buff[4], priv->scr, 0x20); // 0010 and SCR
    528                 write_mpeg_rate(priv->mux, &buff[9], muxer->sysrate);
     527                write_mpeg_ts((unsigned char *)&buff[4], priv->scr, 0x20); // 0010 and SCR
     528                write_mpeg_rate(priv->mux, (unsigned char *)&buff[9], muxer->sysrate);
    529529                len = 12;
    530530        }
    531531        else
    532532        {
    533                 write_mpeg2_scr(&buff[4], priv->scr); // 0010 and SCR
    534                 write_mpeg_rate(priv->mux, &buff[10], muxer->sysrate);
     533                write_mpeg2_scr((unsigned char *)&buff[4], priv->scr); // 0010 and SCR
     534                write_mpeg_rate(priv->mux, (unsigned char *)&buff[10], muxer->sysrate);
    535535                buff[13] = 0xf8; //5 bits reserved + 3 set to 0 to indicate 0 stuffing bytes
    536536                len = 14;
    537537        }
     
    552552        len += 4;
    553553        *(uint16_t *)(&buff[len]) = 0;  //fake length, we'll fix it later
    554554        len += 2;
    555         write_mpeg_rate(MUX_MPEG1, &buff[len], muxer->sysrate);
     555        write_mpeg_rate(MUX_MPEG1, (unsigned char *)&buff[len], muxer->sysrate);
    556556        len += 3;
    557557               
    558558        buff[len++] = 0x4 | (priv->is_xvcd ? 1 : 0);    //1 audio stream bound, no fixed, CSPS only for xvcd
     
    563563        for(i = 0; i < priv->sys_info.cnt; i++)
    564564        {
    565565                buff[len++] = priv->sys_info.streams[i].id;
    566                 write_mpeg_std(&buff[len], priv->sys_info.streams[i].bufsize, priv->sys_info.streams[i].type,
     566                write_mpeg_std((unsigned char *)&buff[len], priv->sys_info.streams[i].bufsize, priv->sys_info.streams[i].type,
    567567                        (priv->sys_info.streams[i].type == 1 ? 0xe0: 0xc0));
    568568                len += 2;
    569569        }
     
    619619       
    620620        *(uint16_t *)(&buff[4]) = be2me_16(len - 6 + 4);        // length field fixed, including size of CRC32
    621621       
    622         *(uint32_t *)(&buff[len]) = CalcCRC32(buff, len);
     622        *(uint32_t *)((unsigned char *)&buff[len]) = CalcCRC32((unsigned char *)buff, len);
    623623       
    624624        len += 4;       //for crc
    625625       
     
    728728        muxer_priv_t *priv = (muxer_priv_t *) muxer->priv;
    729729        uint8_t *buff = priv->buff;
    730730       
    731         offset = write_mpeg_pack_header(muxer, buff);
    732         offset += write_mpeg_psm(muxer, &buff[offset]);
     731        offset = write_mpeg_pack_header(muxer, (char *)buff);
     732        offset += write_mpeg_psm(muxer, (char *)&buff[offset]);
    733733        stuffing_len = priv->packet_size - offset;
    734734        if(stuffing_len > 0)
    735735        {
     
    841841               
    842842        if((len == 0) || (bl == NULL))                  //PACK headers only
    843843        {
    844                 offset = write_mpeg_pack_header(muxer, buff);
    845                 offset += write_mpeg_system_header(muxer, &buff[offset]);
     844                offset = write_mpeg_pack_header(muxer, (char *)buff);
     845                offset += write_mpeg_system_header(muxer, (char *)&buff[offset]);
    846846               
    847847                //priv->update_system_header = 0;
    848848               
     
    875875                //stuffing_len is the size of the stuffing pes stream (must be at least 7 bytes long)
    876876                stflen = stuffing_len = 0;
    877877                offset = 0;
    878                 offset = pack_hlen = write_mpeg_pack_header(muxer, &buff[offset]);
     878                offset = pack_hlen = write_mpeg_pack_header(muxer, (char *)&buff[offset]);
    879879               
    880880                if(priv->update_system_header && (priv->is_genmpeg1 || priv->is_genmpeg2))
    881881                {
    882                         pack_hlen += write_mpeg_system_header(muxer, &buff[offset]);
     882                        pack_hlen += write_mpeg_system_header(muxer, (char *)&buff[offset]);
    883883                        priv->update_system_header = 0;
    884884                }
    885885
     
    11351135        if((priv->is_xsvcd || priv->is_xvcd) && apriv->size == 0)
    11361136                apriv->buffer_size = 4*1024;
    11371137       
    1138         len = write_mpeg_pack(muxer, as, muxer->file, priv->abuf, tlen, 0);
     1138        len = write_mpeg_pack(muxer, as, muxer->file, (char *)priv->abuf, tlen, 0);
    11391139
    11401140        if((priv->is_xsvcd || priv->is_xvcd) && apriv->size == 0)
    11411141                apriv->buffer_size = 0;
     
    16631663                                        pl_size = update = vbytes = 0; 
    16641664                                }
    16651665                                if(pl_size)
    1666                                         pl_size = write_mpeg_pack(muxer, vs, muxer->file, buf, pl_size, 0);
     1666                                        pl_size = write_mpeg_pack(muxer, vs, muxer->file, (char *)buf, pl_size, 0);
    16671667                                vpriv->pes_is_aligned = 0;
    16681668                                vpriv->pts = vpriv->dts = 0;
    16691669                                vpriv->buffer_size = 0;
     
    25402540                }
    25412541        }
    25422542       
    2543         parse_audio(s, 0, &nf, &fake_timer);
     2543        parse_audio(s, 0, (int *)&nf, &fake_timer);
    25442544        sz = max(len, 2 * priv->packet_size);
    25452545  }
    25462546 
  • libmpdemux/network.c

    diff -Naur main2/libmpdemux/network.c main/libmpdemux/network.c
    old new  
    7676        { "video/x-ms-wmv", DEMUXER_TYPE_ASF },
    7777        { "video/x-ms-wma", DEMUXER_TYPE_ASF },
    7878        { "application/x-mms-framed", DEMUXER_TYPE_ASF },
    79         { "application/vnd.ms.wms-hdr.asfv1", DEMUXER_TYPE_ASF },
    80         { "application/octet-stream", DEMUXER_TYPE_ASF },
    8179        // Playlists
    8280        { "video/x-ms-wmx", DEMUXER_TYPE_PLAYLIST },
    8381        { "audio/x-scpls", DEMUXER_TYPE_PLAYLIST },
  • libmpdemux/pnm.c

    diff -Naur main2/libmpdemux/pnm.c main/libmpdemux/pnm.c
    old new  
    442442  char fixme[]={0,1};
    443443
    444444  memcpy(p->buffer,pnm_header,PNM_HEADER_SIZE);
    445   c+=pnm_write_chunk(PNA_CLIENT_CHALLANGE,strlen(pnm_challenge),
    446           pnm_challenge,&p->buffer[c]);
     445  c+=pnm_write_chunk(PNA_CLIENT_CHALLANGE,strlen((char *)pnm_challenge),
     446          (char *)pnm_challenge,&p->buffer[c]);
    447447  c+=pnm_write_chunk(PNA_CLIENT_CAPS,PNM_CLIENT_CAPS_SIZE,
    448           pnm_client_caps,&p->buffer[c]);
     448          (char *)pnm_client_caps,&p->buffer[c]);
    449449  c+=pnm_write_chunk(0x0a,0,NULL,&p->buffer[c]);
    450450  c+=pnm_write_chunk(0x0c,0,NULL,&p->buffer[c]);
    451451  c+=pnm_write_chunk(0x0d,0,NULL,&p->buffer[c]);
    452452  c+=pnm_write_chunk(0x16,2,fixme,&p->buffer[c]);
    453   c+=pnm_write_chunk(PNA_TIMESTAMP,strlen(pnm_timestamp),
    454           pnm_timestamp,&p->buffer[c]);
     453  c+=pnm_write_chunk(PNA_TIMESTAMP,strlen((char *)pnm_timestamp),
     454          (char *)pnm_timestamp,&p->buffer[c]);
    455455  c+=pnm_write_chunk(PNA_BANDWIDTH,4,
    456456          (const char *)&pnm_default_bandwidth,&p->buffer[c]);
    457457  c+=pnm_write_chunk(0x08,0,NULL,&p->buffer[c]);
     
    461461  c+=pnm_write_chunk(0x10,0,NULL,&p->buffer[c]);
    462462  c+=pnm_write_chunk(0x15,0,NULL,&p->buffer[c]);
    463463  c+=pnm_write_chunk(0x12,0,NULL,&p->buffer[c]);
    464   c+=pnm_write_chunk(PNA_GUID,strlen(pnm_guid),
    465           pnm_guid,&p->buffer[c]);
     464  c+=pnm_write_chunk(PNA_GUID,strlen((char *)pnm_guid),
     465          (char *)pnm_guid,&p->buffer[c]);
    466466  c+=pnm_write_chunk(PNA_TWENTYFOUR,PNM_TWENTYFOUR_SIZE,
    467           pnm_twentyfour,&p->buffer[c]);
     467          (char *)pnm_twentyfour,&p->buffer[c]);
    468468 
    469469  /* data after chunks */
    470470  memcpy(&p->buffer[c],after_chunks,after_chunks_length);
     
    472472
    473473  /* client id string */
    474474  p->buffer[c]=PNA_CLIENT_STRING;
    475   i16=BE_16D((strlen(client_string)-1)); /* don't know why do we have -1 here */
     475  i16=BE_16D((strlen((char *)client_string)-1)); /* don't know why do we have -1 here */
    476476  memcpy(&p->buffer[c+1],&i16,2);
    477   memcpy(&p->buffer[c+3],client_string,strlen(client_string)+1);
    478   c=c+3+strlen(client_string)+1;
     477  memcpy(&p->buffer[c+3],client_string,strlen((char *)client_string)+1);
     478  c=c+3+strlen((char *)client_string)+1;
    479479
    480480  /* file path */
    481481  p->buffer[c]=0;
     
    535535      mp_msg(MSGT_OPEN, MSGL_ERR, "input_pnm: header buffer overflow. exiting\n");
    536536      return 0;
    537537    }
    538     chunk_size=pnm_get_chunk(p,HEADER_SIZE-size,&chunk_type,ptr,&nr);
     538    chunk_size=pnm_get_chunk(p,HEADER_SIZE-size,&chunk_type,(char *)ptr,&nr);
    539539    if (chunk_size < 0) return 0;
    540540    if (chunk_type == 0) break;
    541541    if (chunk_type == PNA_TAG)
     
    797797    return NULL;
    798798  }
    799799  if (need_response)
    800     pnm_send_response(p, pnm_response);
     800    pnm_send_response(p, (char *)pnm_response);
    801801  p->ts_last[0]=0;
    802802  p->ts_last[1]=0;
    803803 
     
    814814 
    815815  int to_copy=len;
    816816  char *dest=data;
    817   char *source=this->recv + this->recv_read;
     817  unsigned char *source=this->recv + this->recv_read;
    818818  int fill=this->recv_size - this->recv_read;
    819819  int retval;
    820820 
  • libmpdemux/realrtsp/real.c

    diff -Naur main2/libmpdemux/realrtsp/real.c main/libmpdemux/realrtsp/real.c
    old new  
    399399 
    400400  if (xor_table != NULL)
    401401  {
    402     table_len = strlen(xor_table);
     402    table_len = strlen((char *)xor_table);
    403403
    404404    if (table_len > 56) table_len=56;
    405405
     
    606606  static uint32_t prev_ts = -1;
    607607  static int prev_stream_number = -1;
    608608
    609   n=rtsp_read_data(rtsp_session, header, 8);
     609  n=rtsp_read_data(rtsp_session, (char *)header, 8);
    610610  if (n<8) return 0;
    611611  if (header[0] != 0x24)
    612612  {
     
    627627    header[0]=header[5];
    628628    header[1]=header[6];
    629629    header[2]=header[7];
    630     n=rtsp_read_data(rtsp_session, header+3, 5);
     630    n=rtsp_read_data(rtsp_session, (char *)header+3, 5);
    631631    if (n<5) return 0;
    632632#ifdef LOG
    633633    printf("ignoring bytes:\n");
    634634    hexdump(header, 8);
    635635#endif
    636     n=rtsp_read_data(rtsp_session, header+4, 4);
     636    n=rtsp_read_data(rtsp_session, (char *)header+4, 4);
    637637    if (n<4) return 0;
    638638    flags1=header[4];
    639639    size-=9;
     
    641641  flags2=header[7];
    642642  // header[5..6] == frame number in stream
    643643  unknown1=(header[5]<<16)+(header[6]<<8)+(header[7]);
    644   n=rtsp_read_data(rtsp_session, header, 6);
     644  n=rtsp_read_data(rtsp_session, (char *)header, 6);
    645645  if (n<6) return 0;
    646646  ts=BE_32(header);
    647647 
  • libmpdemux/realrtsp/rtsp_session.c

    diff -Naur main2/libmpdemux/realrtsp/rtsp_session.c main/libmpdemux/realrtsp/rtsp_session.c
    old new  
    134134      }
    135135    }
    136136       
    137     rtsp_session->header_len=rmff_dump_header(h,rtsp_session->header,1024);
     137    rtsp_session->header_len=rmff_dump_header(h,(char *)rtsp_session->header,1024);
    138138
    139139    rtsp_session->recv = xbuffer_copyin(rtsp_session->recv, 0, rtsp_session->header, rtsp_session->header_len);
    140140    rtsp_session->recv_size = rtsp_session->header_len;
     
    158158 
    159159  int to_copy=len;
    160160  char *dest=data;
    161   char *source=this->recv + this->recv_read;
     161  unsigned char *source=this->recv + this->recv_read;
    162162  int fill=this->recv_size - this->recv_read;
    163163
    164164  if (len < 0) return 0;
  • libmpdemux/rtp.c

    diff -Naur main2/libmpdemux/rtp.c main/libmpdemux/rtp.c
    old new  
    151151          goto err_out;
    152152        }
    153153                err_len = sizeof( err );
    154                 getsockopt( socket_server_fd, SOL_SOCKET, SO_ERROR, &err, &err_len );
     154                getsockopt( socket_server_fd, SOL_SOCKET, SO_ERROR, &err, (unsigned int *)&err_len );
    155155                if( err ) {
    156156                        mp_msg(MSGT_NETWORK,MSGL_DBG2,"Socket error: %d\n", err );
    157157                        goto err_out;
  • libmpdemux/stream.c

    diff -Naur main2/libmpdemux/stream.c main/libmpdemux/stream.c
    old new  
    220220  case STREAMTYPE_STREAM:
    221221#ifdef MPLAYER_NETWORK
    222222    if( s->streaming_ctrl!=NULL ) {
    223             len=s->streaming_ctrl->streaming_read(s->fd,s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl);break;
     223            len=s->streaming_ctrl->streaming_read(s->fd,(char *)s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl);break;
    224224    } else {
    225225      len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;
    226226    }
     
    233233 
    234234   
    235235  default:
    236     len= s->fill_buffer ? s->fill_buffer(s,s->buffer,STREAM_BUFFER_SIZE) : 0;
     236    len= s->fill_buffer ? s->fill_buffer(s,(char *)s->buffer,STREAM_BUFFER_SIZE) : 0;
    237237  }
    238238  if(len<=0){ s->eof=1; s->buf_pos=s->buf_len=0; return 0; }
    239239  s->buf_pos=0;
  • libmpdemux/stream_dvd.c

    diff -Naur main2/libmpdemux/stream_dvd.c main/libmpdemux/stream_dvd.c
    old new  
    143143  dvd_priv_t *d=stream->priv;
    144144  int code,i;
    145145  if(lang) {
    146     while(strlen(lang)>=2) {
     146    while(strlen((char *)lang)>=2) {
    147147      code=lang[1]|(lang[0]<<8);
    148148      for(i=0;i<d->nr_of_channels;i++) {
    149149        if(d->audio_streams[i].language==code) {
     
    180180int dvd_sid_from_lang(stream_t *stream, unsigned char* lang) {
    181181  dvd_priv_t *d=stream->priv;
    182182  int code,i;
    183   while(lang && strlen(lang)>=2) {
     183  while(lang && strlen((char *)lang)>=2) {
    184184    code=lang[1]|(lang[0]<<8);
    185185    for(i=0;i<d->nr_of_subtitles;i++) {
    186186      if(d->subtitles[i].language==code) {
  • libmpdemux/stream_file.c

    diff -Naur main2/libmpdemux/stream_file.c main/libmpdemux/stream_file.c
    old new  
    5959    return 0;
    6060  }
    6161  while(s->pos<newpos){
    62     int len=s->fill_buffer(s,s->buffer,STREAM_BUFFER_SIZE);
     62    int len=s->fill_buffer(s,(char *)s->buffer,STREAM_BUFFER_SIZE);
    6363    if(len<=0){ s->eof=1; s->buf_pos=s->buf_len=0; break; } // EOF
    6464    s->buf_pos=0;
    6565    s->buf_len=len;
     
    101101  m |= O_BINARY;
    102102#endif   
    103103
    104   if(!strcmp(filename,"-")){
     104  if(!strcmp((char *)filename,"-")){
    105105    if(mode == STREAM_READ) {
    106106      // read from stdin
    107107      mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
     
    117117#endif
    118118    }
    119119  } else {
    120     f=open(filename,m);
     120    f=open((char *)filename,m);
    121121    if(f<0) {
    122122      mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);
    123123      m_struct_free(&stream_opts,opts);
  • libmpdemux/tvi_v4l2.c

    diff -Naur main2/libmpdemux/tvi_v4l2.c main/libmpdemux/tvi_v4l2.c
    old new  
    745745                standard.index = i;
    746746                if (-1 == ioctl(priv->video_fd, VIDIOC_ENUMSTD, &standard))
    747747                    return TVI_CONTROL_FALSE;
    748                 if (!strcasecmp(standard.name, (char *)arg)) {
     748                if (!strcasecmp((char *)standard.name, (char *)arg)) {
    749749                    *(int *)arg = i;
    750750                    return TVI_CONTROL_TRUE;
    751751                }
  • libmpdemux/video.c

    diff -Naur main2/libmpdemux/video.c main/libmpdemux/video.c
    old new  
    141141   }
    142142   mp_msg(MSGT_DECVIDEO,MSGL_V,"OK!\n");
    143143   if(!videobuffer) {
    144      videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
     144     videobuffer=(unsigned char*)memalign(8,VIDEOBUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
    145145     if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
    146146     else {
    147147       mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail);
     
    234234   }
    235235   mp_msg(MSGT_DECVIDEO,MSGL_V,"OK!\n");
    236236   if(!videobuffer) {
    237      videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
     237     videobuffer=(unsigned char*)memalign(8,VIDEOBUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
    238238     if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
    239239     else {
    240240       mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail);
     
    295295//   mpeg2_init();
    296296   // ========= Read & process sequence header & extension ============
    297297   if(!videobuffer) {
    298      videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
     298     videobuffer=(unsigned char*)memalign(8,VIDEOBUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
    299299     if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
    300300     else {
    301301       mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail);
  • libmpdemux/yuv4mpeg.c

    diff -Naur main2/libmpdemux/yuv4mpeg.c main/libmpdemux/yuv4mpeg.c
    old new  
    6363   ssize_t n;
    6464
    6565   while (len > 0) {
    66      n = stream_read(s, buf, len);
     66     n = stream_read(s, (unsigned char*)(buf), len);
    6767     if (n <= 0) {
    6868       /* return amount left to read */
    6969       if (n == 0)
     
    597597  /* Read frame header */
    598598  if ((err = y4m_read_frame_header(s, fi)) != Y4M_OK) return err;
    599599  /* Read luminance scanlines */
    600   if (y4m_read(s, yuv[0], w*h)) return Y4M_ERR_SYSTEM;
     600  if (y4m_read(s, (char *)yuv[0], w*h)) return Y4M_ERR_SYSTEM;
    601601  /* Read chrominance scanlines */
    602   if (y4m_read(s, yuv[1], w*h/4)) return Y4M_ERR_SYSTEM;
    603   if (y4m_read(s, yuv[2], w*h/4)) return Y4M_ERR_SYSTEM;
     602  if (y4m_read(s, (char *)yuv[1], w*h/4)) return Y4M_ERR_SYSTEM;
     603  if (y4m_read(s, (char *)yuv[2], w*h/4)) return Y4M_ERR_SYSTEM;
    604604
    605605  return Y4M_OK;
    606606}
  • libmpdvdkit2/css.c

    diff -Naur main2/libmpdvdkit2/css.c main/libmpdvdkit2/css.c
    old new  
    179179            psz_key[KEY_SIZE * 3 - 1] = '\0';
    180180
    181181            if( read( i_fd, psz_key, KEY_SIZE * 3 - 1 ) == KEY_SIZE * 3 - 1
    182                  && sscanf( psz_key, "%x:%x:%x:%x:%x",
     182                 && sscanf( (char *)psz_key, "%x:%x:%x:%x:%x",
    183183                            &k0, &k1, &k2, &k3, &k4 ) == 5 )
    184184            {
    185185                p_title_key[0] = k0;
     
    224224        {
    225225            unsigned char psz_key[KEY_SIZE * 3 + 2];
    226226
    227             sprintf( psz_key, "%02x:%02x:%02x:%02x:%02x\r\n",
     227            sprintf( (char *)psz_key, "%02x:%02x:%02x:%02x:%02x\r\n",
    228228                              p_title_key[0], p_title_key[1], p_title_key[2],
    229229                              p_title_key[3], p_title_key[4] );
    230230
  • libmpdvdkit2/libdvdcss.c

    diff -Naur main2/libmpdvdkit2/libdvdcss.c main/libmpdvdkit2/libdvdcss.c
    old new  
    386386        unsigned char psz_tagfile[PATH_MAX+1+12+1];
    387387        int i_fd;
    388388
    389         sprintf( psz_tagfile, "%s/CACHEDIR.TAG", psz_cache );
    390         i_fd = open( psz_tagfile, O_RDWR|O_CREAT, 0644 );
     389        sprintf( (char *)psz_tagfile, "%s/CACHEDIR.TAG", psz_cache );
     390        i_fd = open( (char *)psz_tagfile, O_RDWR|O_CREAT, 0644 );
    391391        if( i_fd >= 0 )
    392392        {
    393393            write( i_fd, psz_tag, strlen(psz_tag) );
     
    468468            if( psz_serial[i] < '0' || psz_serial[i] > '9' )
    469469            {
    470470                unsigned char psz_tmp[16 + 1];
    471                 sprintf( psz_tmp,
     471                sprintf( (char *)psz_tmp,
    472472                         "%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x",
    473473                         psz_serial[0], psz_serial[1], psz_serial[2],
    474474                         psz_serial[3], psz_serial[4], psz_serial[5],
     
    485485             psz_key[0] = '-';
    486486             for( i = 0; i < KEY_SIZE; i++ )
    487487             {
    488                  sprintf( &psz_key[1+i*2], "%.2x", dvdcss->css.p_disc_key[i] );
     488                 sprintf( (char *)&psz_key[1+i*2], "%.2x", dvdcss->css.p_disc_key[i] );
    489489             }
    490490             psz_key[1 + KEY_SIZE * 2] = '\0';
    491491        }
     
    526526        /* Pointer to the filename we will use. */
    527527        dvdcss->psz_block = dvdcss->psz_cachefile + i;
    528528
    529         sprintf( psz_debug, "using CSS key cache dir: %s",
     529        sprintf( (char *)psz_debug, "using CSS key cache dir: %s",
    530530                            dvdcss->psz_cachefile );
    531         print_debug( dvdcss, psz_debug );
     531        print_debug(dvdcss, (char *)psz_debug );
    532532    }
    533533    nocache:
    534534
  • libvo/font_load.c

    diff -Naur main2/libvo/font_load.c main/libvo/font_load.c
    old new  
    8484
    8585section[0]=0;
    8686
    87 while(fgets(sor,1020,f)){
     87while(fgets((char *)sor,1020,f)){
    8888  unsigned char* p[8];
    8989  int pdb=0;
    9090  unsigned char *s=sor;
     
    133133//  for(i=0;i<pdb;i++) printf("  param %d = '%s'\n",i,p[i]);
    134134
    135135  if(pdb==1 && p[0][0]=='['){
    136       int len=strlen(p[0]);
     136      int len=strlen((char *)p[0]);
    137137      if(len && len<63 && p[0][len-1]==']'){
    138         strcpy(section,p[0]);
     138        strcpy(section,(char *)p[0]);
    139139        mp_msg(MSGT_OSD, MSGL_DBG2, "font: Reading section: %s\n",section);
    140140        if(strcmp(section,"[files]")==0){
    141141            ++fontdb;
     
    149149      if(pdb==1){
    150150          if (desc->fpath)
    151151             free (desc->fpath); // release previously allocated memory
    152           desc->fpath=strdup(p[0]);
     152          desc->fpath=strdup((char *)p[0]);
    153153          continue;
    154154      }
    155155  } else   
    156156
    157157  if(strcmp(section,"[files]")==0){
    158158      char *default_dir=MPLAYER_DATADIR "/font";
    159       if(pdb==2 && strcmp(p[0],"alpha")==0){
     159      if(pdb==2 && strcmp((char *)p[0],"alpha")==0){
    160160          char *cp;
    161           if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out;
     161          if (!(cp=malloc(strlen(desc->fpath)+strlen((char *)p[1])+2))) goto fail_out;
    162162
    163           snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s",
     163          snprintf(cp,strlen(desc->fpath)+strlen((char *)p[1])+2,"%s/%s",
    164164                desc->fpath,p[1]);
    165165          if(!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){
    166166                free(cp);
    167                 if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2)))
     167                if (!(cp=malloc(strlen(default_dir)+strlen((char *)p[1])+2)))
    168168                   goto fail_out;
    169                 snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s",
     169                snprintf(cp,strlen(default_dir)+strlen((char *)p[1])+2,"%s/%s",
    170170                         default_dir,p[1]);
    171171                if (!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){
    172172                   mp_msg(MSGT_OSD, MSGL_ERR, "Can't load font bitmap: %s\n",p[1]);
     
    177177          free(cp);
    178178          continue;
    179179      }
    180       if(pdb==2 && strcmp(p[0],"bitmap")==0){
     180      if(pdb==2 && strcmp((char *)p[0],"bitmap")==0){
    181181          char *cp;
    182           if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out;
     182          if (!(cp=malloc(strlen(desc->fpath)+strlen((char *)p[1])+2))) goto fail_out;
    183183
    184           snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s",
     184          snprintf(cp,strlen(desc->fpath)+strlen((char *)p[1])+2,"%s/%s",
    185185                desc->fpath,p[1]);
    186186          if(!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){
    187187                free(cp);
    188                 if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2)))
     188                if (!(cp=malloc(strlen(default_dir)+strlen((char *)p[1])+2)))
    189189                   goto fail_out;
    190                 snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s",
     190                snprintf(cp,strlen(default_dir)+strlen((char *)p[1])+2,"%s/%s",
    191191                         default_dir,p[1]);
    192192                if (!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){
    193193                   mp_msg(MSGT_OSD, MSGL_ERR, "Can't load font bitmap: %s\n",p[1]);
     
    201201  } else
    202202
    203203  if(strcmp(section,"[info]")==0){
    204       if(pdb==2 && strcmp(p[0],"name")==0){
    205           desc->name=strdup(p[1]);
     204      if(pdb==2 && strcmp((char *)p[0],"name")==0){
     205          desc->name=strdup((char *)p[1]);
    206206          continue;
    207207      }
    208       if(pdb==2 && strcmp(p[0],"descversion")==0){
    209           version=atoi(p[1]);
     208      if(pdb==2 && strcmp((char *)p[0],"descversion")==0){
     209          version=atoi((char *)p[1]);
    210210          continue;
    211211      }
    212       if(pdb==2 && strcmp(p[0],"spacewidth")==0){
    213           desc->spacewidth=atoi(p[1]);
     212      if(pdb==2 && strcmp((char *)p[0],"spacewidth")==0){
     213          desc->spacewidth=atoi((char *)p[1]);
    214214          continue;
    215215      }
    216       if(pdb==2 && strcmp(p[0],"charspace")==0){
    217           desc->charspace=atoi(p[1]);
     216      if(pdb==2 && strcmp((char *)p[0],"charspace")==0){
     217          desc->charspace=atoi((char *)p[1]);
    218218          continue;
    219219      }
    220       if(pdb==2 && strcmp(p[0],"height")==0){
    221           desc->height=atoi(p[1]);
     220      if(pdb==2 && strcmp((char *)p[0],"height")==0){
     221          desc->height=atoi((char *)p[1]);
    222222          continue;
    223223      }
    224224  } else
     
    226226  if(strcmp(section,"[characters]")==0){
    227227      if(pdb==3){
    228228          int chr=p[0][0];
    229           int start=atoi(p[1]);
    230           int end=atoi(p[2]);
     229          int start=atoi((char *)p[1]);
     230          int end=atoi((char *)p[2]);
    231231          if(sub_unicode && (chr>=0x80)) chr=(chr<<8)+p[0][1];
    232           else if(strlen(p[0])!=1) chr=strtol(p[0],NULL,0);
     232          else if(strlen((char *)p[0])!=1) chr=strtol((char *)p[0],NULL,0);
    233233          if(end<start) {
    234234              mp_msg(MSGT_OSD, MSGL_WARN, "error in font desc: end<start for char '%c'\n",chr);
    235235          } else {
  • libvo/font_load_ft.c

    diff -Naur main2/libvo/font_load_ft.c main/libvo/font_load_ft.c
    old new  
    598598   
    599599    if (desc->tables.g_r) {
    600600        blur(abuffer+off, desc->tables.tmp, width, height, stride,
    601              desc->tables.gt2, desc->tables.g_r,
     601             (int *)desc->tables.gt2, desc->tables.g_r,
    602602             desc->tables.g_w);
    603603//      fprintf(stderr, "fg: blur t = %lf\n", GetTimer()-t);
    604604    }
     
    740740    int inbytesleft = 1;
    741741    int outbytesleft = sizeof(FT_ULong);
    742742
    743     iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
     743    iconv(*cd, &inbuf, (unsigned int *)&inbytesleft, &outbuf, (unsigned int *)&outbytesleft);
    744744
    745745    /* convert unicode BigEndian -> MachineEndian */
    746746    o = be2me_32(o);
     
    11421142        if (!font_name)
    11431143            font_name = "sans-serif";
    11441144        FcInit();
    1145         fc_pattern = FcNameParse(font_name);
     1145        fc_pattern = FcNameParse((unsigned char *)font_name);
    11461146        FcConfigSubstitute(0, fc_pattern, FcMatchPattern);
    11471147        FcDefaultSubstitute(fc_pattern);
    11481148        fc_pattern = FcFontMatch(0, fc_pattern, 0);
    11491149        FcPatternGetBool(fc_pattern, FC_SCALABLE, 0, &scalable);
    11501150        if (scalable != FcTrue) {
    1151             fc_pattern = FcNameParse("sans-serif");
     1151            fc_pattern = FcNameParse((unsigned char *)"sans-serif");
    11521152            FcConfigSubstitute(0, fc_pattern, FcMatchPattern);
    11531153            FcDefaultSubstitute(fc_pattern);
    11541154            fc_pattern = FcFontMatch(0, fc_pattern, 0);
    11551155        }
    11561156        // s doesn't need to be freed according to fontconfig docs
    11571157        FcPatternGetString(fc_pattern, FC_FILE, 0, &s);
    1158         vo_font=read_font_desc_ft(s, width, height);
     1158        vo_font=read_font_desc_ft((char *)s, width, height);
    11591159        free(fc_pattern);
    11601160    }
    11611161    else
  • libvo/sub.c

    diff -Naur main2/libvo/sub.c main/libvo/sub.c
    old new  
    367367            xsize = -vo_font->charspace;
    368368          l--;
    369369          t=vo_sub->text[i++];   
    370           len=strlen(t)-1;
     370          len=strlen((char *)t)-1;
    371371            char_position = 0;
    372372            char_seq = (int *) malloc((len + 1) * sizeof(int));
    373373
  • libvo/vo_dga.c

    diff -Naur main2/libvo/vo_dga.c main/libvo/vo_dga.c
    old new  
    243243    {
    244244
    245245        case 32:
    246             vo_draw_alpha_rgb32(w, h, src, srca, stride, d + 4 * offset,
     246            vo_draw_alpha_rgb32(w, h, src, srca, stride, (unsigned char *)d + 4 * offset,
    247247                                4 * buffer_stride);
    248248            break;
    249249        case 24:
    250             vo_draw_alpha_rgb24(w, h, src, srca, stride, d + 3 * offset,
     250            vo_draw_alpha_rgb24(w, h, src, srca, stride, (unsigned char *)d + 3 * offset,
    251251                                3 * buffer_stride);
    252252            break;
    253253        case 15:
    254             vo_draw_alpha_rgb15(w, h, src, srca, stride, d + 2 * offset,
     254            vo_draw_alpha_rgb15(w, h, src, srca, stride, (unsigned char *)d + 2 * offset,
    255255                                2 * buffer_stride);
    256256            break;
    257257        case 16:
    258             vo_draw_alpha_rgb16(w, h, src, srca, stride, d + 2 * offset,
     258            vo_draw_alpha_rgb16(w, h, src, srca, stride, (unsigned char *)d + 2 * offset,
    259259                                2 * buffer_stride);
    260260            break;
    261261    }
     
    637637        aspect_save_orig(scale_srcW, scale_srcH);
    638638        aspect_save_prescale(scale_dstW, scale_dstH);
    639639        if (flags & VOFLAG_FULLSCREEN)       /* -fs */
    640             aspect(&scale_dstW, &scale_dstH, A_ZOOM);
     640            aspect((int *)&scale_dstW, (int *)&scale_dstH, A_ZOOM);
    641641        else if (flags & VOFLAG_SWSCALE)  /* -fs */
    642             aspect(&scale_dstW, &scale_dstH, A_NOZOOM);
     642            aspect((int *)&scale_dstW, (int *)&scale_dstH, A_NOZOOM);
    643643        mp_msg(MSGT_VO, MSGL_INFO,
    644644               "vo_dga: Aspect corrected size for SwScaler: %4d x %4d.\n",
    645645               scale_dstW, scale_dstH);
  • libvo/vo_gl2.c

    diff -Naur main2/libvo/vo_gl2.c main/libvo/vo_gl2.c
    old new  
    791791        glValName(gl_bitmap_format), glValName(gl_bitmap_type),
    792792        rgb_sz, r_sz, g_sz, b_sz, a_sz, glValName(gl_internal_format));
    793793
    794   resize(&d_width, &d_height);
     794  resize((int *)&d_width, (int *)&d_height);
    795795
    796796  glClearColor( 0.0f,0.0f,0.0f,0.0f );
    797797  glClear( GL_COLOR_BUFFER_BIT );
     
    820820        aspect_save_prescale(d_width,d_height);
    821821        aspect_save_screenres(vo_screenwidth,vo_screenheight);
    822822
    823         aspect(&d_width,&d_height,A_NOZOOM);
     823        aspect((int *)&d_width,(int *)&d_height,A_NOZOOM);
    824824        vo_dx = (int)(vo_screenwidth - d_width) / 2;
    825825        vo_dy = (int)(vo_screenheight - d_height) / 2;
    826         geometry(&vo_dx, &vo_dy, &d_width, &d_height,
     826        geometry(&vo_dx, &vo_dy, (int *)&d_width, (int *)&d_height,
    827827                  vo_screenwidth, vo_screenheight);
    828828
    829829#if defined(HAVE_NEW_GUI) && !defined(GL_WIN32)
     
    862862        mp_msg(MSGT_VO, MSGL_INFO, "[gl2] You have OpenGL < 1.2 drivers, BAD (16bpp and BGR may be damaged!)\n");
    863863  }
    864864
    865   glFindFormat(format, &image_bpp, &gl_internal_format, &gl_bitmap_format, &gl_bitmap_type);
     865  glFindFormat(format, (int *)&image_bpp, &gl_internal_format, &gl_bitmap_format, &gl_bitmap_type);
    866866
    867867  image_bytes=(image_bpp+7)/8;
    868868
  • libvo/vo_gl.c

    diff -Naur main2/libvo/vo_gl.c main/libvo/vo_gl.c
    old new  
    308308        aspect_save_prescale(d_width,d_height);
    309309        aspect_save_screenres(vo_screenwidth,vo_screenheight);
    310310
    311         aspect(&d_width,&d_height,A_NOZOOM);
     311        aspect((int *)&d_width,(int *)&d_height,A_NOZOOM);
    312312        vo_dx = (int)(vo_screenwidth - d_width) / 2;
    313313        vo_dy = (int)(vo_screenheight - d_height) / 2;
    314         geometry(&vo_dx, &vo_dy, &d_width, &d_height,
     314        geometry(&vo_dx, &vo_dy, (int *)&d_width, (int *)&d_height,
    315315                  vo_screenwidth, vo_screenheight);
    316316#ifdef HAVE_NEW_GUI
    317317  if (use_gui) {
  • libvo/vo_jpeg.c

    diff -Naur main2/libvo/vo_jpeg.c main/libvo/vo_jpeg.c
    old new  
    179179    int row_stride;
    180180
    181181    if ( !buffer ) return 1;
    182     if ( (outfile = fopen(name, "wb") ) == NULL ) {
     182    if ( (outfile = fopen((char *)name, "wb") ) == NULL ) {
    183183        mp_msg(MSGT_VO, MSGL_ERR, "\n%s: %s\n", info.short_name,
    184184                MSGTR_VO_CantCreateFile);
    185185        mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n",
     
    264264   
    265265    framecounter++;
    266266   
    267     return jpeg_write(buf, src[0]);
     267    return jpeg_write((unsigned char *)buf, src[0]);
    268268}
    269269
    270270/* ------------------------------------------------------------------------- */
  • libvo/vo_x11.c

    diff -Naur main2/libvo/vo_x11.c main/libvo/vo_x11.c
    old new  
    288288    srcH = height;
    289289    vo_dx = (vo_screenwidth - d_width) / 2;
    290290    vo_dy = (vo_screenheight - d_height) / 2;
    291     geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
     291    geometry(&vo_dx, &vo_dy, (int *)&d_width, (int *)&d_height, vo_screenwidth,
    292292             vo_screenheight);
    293293    vo_dwidth = d_width;
    294294    vo_dheight = d_height;
     
    346346                vm_width = d_width;
    347347                vm_height = d_height;
    348348            }
    349             vo_vm_switch(vm_width, vm_height, &modeline_width,
    350                          &modeline_height);
     349            vo_vm_switch(vm_width, vm_height, (int *)&modeline_width,
     350                         (int *)&modeline_height);
    351351            vo_dx = (vo_screenwidth - modeline_width) / 2;
    352352            vo_dy = (vo_screenheight - modeline_height) / 2;
    353353            vo_dwidth = modeline_width;
     
    392392                                           ExposureMask);
    393393                XMapWindow(mDisplay, vo_window);
    394394                XGetGeometry(mDisplay, vo_window, &mRootWin,
    395                              &vo_dx, &vo_dy, &vo_dwidth, &vo_dheight,
    396                              &border, &depth);
     395                             &vo_dx, &vo_dy, (unsigned int *)&vo_dwidth, (unsigned int *)&vo_dheight,
     396                             (unsigned int *)&border, (unsigned int *)&depth);
    397397            } else
    398398                XSelectInput(mDisplay, vo_window, ExposureMask);
    399399        } else
  • libvo/vo_xover.c

    diff -Naur main2/libvo/vo_xover.c main/libvo/vo_xover.c
    old new  
    8080  Window mRoot;
    8181  if ( WinID )
    8282    {
    83       XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &drwWidth,
    84                    &drwHeight, &drwBorderWidth, &drwDepth);
     83      XGetGeometry(mDisplay, vo_window, &mRoot, (int *)&drwX, (int *)&drwY, (unsigned int *)&drwWidth,
     84                   (unsigned int *)&drwHeight, &drwBorderWidth, &drwDepth);
    8585      drwX = drwY = 0;
    8686
    8787      XTranslateCoordinates(mDisplay, vo_window, mRoot, 0, 0,
    88                             &drwcX, &drwcY, &mRoot);
    89       aspect(&dwidth,&dheight,A_NOZOOM);
     88                            (int *)&drwcX, (int *)&drwcY, &mRoot);
     89      aspect((int *)&dwidth,(int *)&dheight,A_NOZOOM);
    9090      if (!vo_fs)
    9191        mp_msg(MSGT_VO, MSGL_V, "[xvidix] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",
    9292               drwcX, drwcY, drwX, drwY, drwWidth, drwHeight);
     
    9595    }
    9696  else
    9797    {
    98       aspect(&dwidth,&dheight,A_NOZOOM);
     98      aspect((int *)&dwidth,(int *)&dheight,A_NOZOOM);
    9999      drwcX=drwX=vo_dx; drwcY=drwY=vo_dy; drwWidth=vo_dwidth; drwHeight=vo_dheight;
    100100    }
    101101
    102102#if X11_FULLSCREEN
    103103  if (vo_fs)
    104104    {
    105       aspect(&dwidth,&dheight,A_ZOOM);
     105      aspect((int *)&dwidth,(int *)&dheight,A_ZOOM);
    106106      drwX = (vo_screenwidth - ((int)dwidth > vo_screenwidth ? vo_screenwidth : dwidth)) / 2;
    107107      drwcX = drwX;
    108108      drwY = (vo_screenheight - ((int)dheight > vo_screenheight ? vo_screenheight : dheight)) / 2;
     
    258258    }
    259259  mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey);
    260260
    261   aspect(&d_width, &d_height, A_NOZOOM);
     261  aspect((int *)&d_width, (int *)&d_height, A_NOZOOM);
    262262
    263263  vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;   
    264264  vo_dwidth=d_width; vo_dheight=d_height;
     
    270270#endif
    271271
    272272#ifdef X11_FULLSCREEN
    273       if ( ( flags&VOFLAG_FULLSCREEN )||(flags & VOFLAG_SWSCALE) ) aspect(&d_width, &d_height, A_ZOOM);
     273      if ( ( flags&VOFLAG_FULLSCREEN )||(flags & VOFLAG_SWSCALE) ) aspect((int *)&d_width, (int *)&d_height, A_ZOOM);
    274274#endif
    275275      dwidth = d_width;
    276276      dheight = d_height;
  • libvo/vo_xv.c

    diff -Naur main2/libvo/vo_xv.c main/libvo/vo_xv.c
    old new  
    102102{
    103103    x0 += image_width * (vo_panscan_x >> 1) / (vo_dwidth + vo_panscan_x);
    104104    vo_draw_alpha_yv12(w, h, src, srca, stride,
    105                        xvimage[current_buf]->data +
     105                       (unsigned char *)xvimage[current_buf]->data +
    106106                       xvimage[current_buf]->offsets[0] +
    107107                       xvimage[current_buf]->pitches[0] * y0 + x0,
    108108                       xvimage[current_buf]->pitches[0]);
     
    114114{
    115115    x0 += image_width * (vo_panscan_x >> 1) / (vo_dwidth + vo_panscan_x);
    116116    vo_draw_alpha_yuy2(w, h, src, srca, stride,
    117                        xvimage[current_buf]->data +
     117                       (unsigned char *)xvimage[current_buf]->data +
    118118                       xvimage[current_buf]->offsets[0] +
    119119                       xvimage[current_buf]->pitches[0] * y0 + 2 * x0,
    120120                       xvimage[current_buf]->pitches[0]);
     
    126126{
    127127    x0 += image_width * (vo_panscan_x >> 1) / (vo_dwidth + vo_panscan_x);
    128128    vo_draw_alpha_yuy2(w, h, src, srca, stride,
    129                        xvimage[current_buf]->data +
     129                       (unsigned char *)xvimage[current_buf]->data +
    130130                       xvimage[current_buf]->offsets[0] +
    131131                       xvimage[current_buf]->pitches[0] * y0 + 2 * x0 + 1,
    132132                       xvimage[current_buf]->pitches[0]);
     
    192192
    193193    vo_dx = (vo_screenwidth - d_width) / 2;
    194194    vo_dy = (vo_screenheight - d_height) / 2;
    195     geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
     195    geometry(&vo_dx, &vo_dy, (int *)&d_width, (int *)&d_height, vo_screenwidth,
    196196             vo_screenheight);
    197197    vo_dwidth = d_width;
    198198    vo_dheight = d_height;
     
    232232    {
    233233        hint.x = vo_dx;
    234234        hint.y = vo_dy;
    235         aspect(&d_width, &d_height, A_NOZOOM);
     235        aspect((int *)&d_width, (int *)&d_height, A_NOZOOM);
    236236        hint.width = d_width;
    237237        hint.height = d_height;
    238238#ifdef HAVE_XF86VM
     
    247247                vm_width = d_width;
    248248                vm_height = d_height;
    249249            }
    250             vo_vm_switch(vm_width, vm_height, &modeline_width,
    251                          &modeline_height);
     250            vo_vm_switch(vm_width, vm_height, (int *)&modeline_width,
     251                         (int *)&modeline_height);
    252252            hint.x = (vo_screenwidth - modeline_width) / 2;
    253253            hint.y = (vo_screenheight - modeline_height) / 2;
    254254            hint.width = modeline_width;
     
    266266             * irritated for now (and send lots o' mails ;) ::atmos
    267267             */
    268268
    269             aspect(&d_width, &d_height, A_ZOOM);
     269            aspect((int *)&d_width, (int *)&d_height, A_ZOOM);
    270270#endif
    271271
    272272        }
     
    309309                                           ExposureMask);
    310310                XMapWindow(mDisplay, vo_window);
    311311                XGetGeometry(mDisplay, vo_window, &mRoot,
    312                              &drwX, &drwY, &vo_dwidth, &vo_dheight,
     312                             (int *)&drwX, (int *)&drwY, (unsigned int *)&vo_dwidth, (unsigned int *)&vo_dheight,
    313313                             &drwBorderWidth, &drwDepth);
    314314                drwX = drwY = 0; // coordinates need to be local to the window
    315315                aspect_save_prescale(vo_dwidth, vo_dheight);
     
    564564
    565565    if (e & VO_EVENT_RESIZE)
    566566    {
    567         XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &vo_dwidth,
    568                      &vo_dheight, &drwBorderWidth, &drwDepth);
     567        XGetGeometry(mDisplay, vo_window, &mRoot, (int *)&drwX, (int *)&drwY, (unsigned int *)&vo_dwidth,
     568                     (unsigned int *)&vo_dheight, &drwBorderWidth, &drwDepth);
    569569        drwX = drwY = 0;
    570570        mp_msg(MSGT_VO, MSGL_V, "[xv] dx: %d dy: %d dw: %d dh: %d\n", drwX,
    571571               drwY, vo_dwidth, vo_dheight);
    572572
    573         aspect(&dwidth, &dheight, A_NOZOOM);
     573        aspect((int *)&dwidth, (int *)&dheight, A_NOZOOM);
    574574        if (vo_fs)
    575575        {
    576             aspect(&dwidth, &dheight, A_ZOOM);
     576            aspect((int *)&dwidth, (int *)&dheight, A_ZOOM);
    577577            drwX =
    578578                (vo_screenwidth -
    579579                 (dwidth > vo_screenwidth ? vo_screenwidth : dwidth)) / 2;
  • libvo/vo_xvidix.c

    diff -Naur main2/libvo/vo_xvidix.c main/libvo/vo_xvidix.c
    old new  
    8181
    8282    if (WinID)
    8383    {
    84         XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &drwWidth,
    85                      &drwHeight, &drwBorderWidth, &drwDepth);
     84        XGetGeometry(mDisplay, vo_window, &mRoot, (int *)&drwX, (int *)&drwY, (unsigned int *)&drwWidth,
     85                     (unsigned int *)&drwHeight, &drwBorderWidth, &drwDepth);
    8686        drwX = drwY = 0;
    8787
    8888        XTranslateCoordinates(mDisplay, vo_window, mRoot, 0, 0,
    89                               &drwcX, &drwcY, &mRoot);
    90         aspect(&dwidth, &dheight, A_NOZOOM);
     89                              (int *)&drwcX, (int *)&drwcY, &mRoot);
     90        aspect((int *)&dwidth, (int *)&dheight, A_NOZOOM);
    9191        if (!vo_fs)
    9292            mp_msg(MSGT_VO, MSGL_V,
    9393                   "[xvidix] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",
     
    9696        /* following stuff copied from vo_xmga.c */
    9797    } else
    9898    {
    99         aspect(&dwidth, &dheight, A_NOZOOM);
     99        aspect((int *)&dwidth, (int *)&dheight, A_NOZOOM);
    100100        drwcX = drwX = vo_dx;
    101101        drwcY = drwY = vo_dy;
    102102        drwWidth = vo_dwidth;
     
    106106#if X11_FULLSCREEN
    107107    if (vo_fs)
    108108    {
    109         aspect(&dwidth, &dheight, A_ZOOM);
     109        aspect((int *)&dwidth, (int *)&dheight, A_ZOOM);
    110110        drwX =
    111111            (vo_screenwidth -
    112112             (dwidth > vo_screenwidth ? vo_screenwidth : dwidth)) / 2;
     
    255255    vo_dy = 0;
    256256    vo_dx = (vo_screenwidth - d_width) / 2;
    257257    vo_dy = (vo_screenheight - d_height) / 2;
    258     geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
     258    geometry(&vo_dx, &vo_dy, (int *)&d_width, (int *)&d_height, vo_screenwidth,
    259259             vo_screenheight);
    260260    window_width = d_width;
    261261    window_height = d_height;
     
    288288    }
    289289    mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey);
    290290
    291     aspect(&d_width, &d_height, A_NOZOOM);
     291    aspect((int *)&d_width, (int *)&d_height, A_NOZOOM);
    292292
    293293    vo_dwidth = d_width;
    294294    vo_dheight = d_height;
     
    302302
    303303#ifdef X11_FULLSCREEN
    304304        if ((flags & VOFLAG_FULLSCREEN) || (flags & VOFLAG_SWSCALE))
    305             aspect(&d_width, &d_height, A_ZOOM);
     305            aspect((int *)&d_width, (int *)&d_height, A_ZOOM);
    306306#endif
    307307        dwidth = d_width;
    308308        dheight = d_height;
  • libvo/x11_common.c

    diff -Naur main2/libvo/x11_common.c main/libvo/x11_common.c
    old new  
    10361036                    Window win;
    10371037
    10381038                    XGetGeometry(mydisplay, vo_window, &root, &foo, &foo,
    1039                                  &foo /*width */ , &foo /*height */ , &foo,
    1040                                  &foo);
     1039                                 (unsigned int *)&foo /*width */ ,(unsigned int *) &foo /*height */ ,(unsigned int *) &foo,
     1040                                 (unsigned int *)&foo);
    10411041                    XTranslateCoordinates(mydisplay, vo_window, root, 0, 0,
    10421042                                          &vo_dx, &vo_dy, &win);
    10431043                }
  • loader/pe_image.c

    diff -Naur main2/loader/pe_image.c main/loader/pe_image.c
    old new  
    312312                } else {               
    313313                    pe_name = (PIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData);
    314314//                  TRACE("--- %s %s.%d\n", pe_name->Name, name, pe_name->Hint);
    315                     thunk_list->u1.Function=LookupExternalByName(name, pe_name->Name);
     315                    thunk_list->u1.Function=LookupExternalByName(name, (char *)pe_name->Name);
    316316                }
    317317                import_list++;
    318318                thunk_list++;
     
    333333                    TRACE("--- %s %s.%d\n",
    334334                                  pe_name->Name,name,pe_name->Hint);
    335335                    thunk_list->u1.Function=LookupExternalByName(
    336                       name, pe_name->Name);
     336                      name, (char *)pe_name->Name);
    337337                }
    338338                thunk_list++;
    339339            }
  • loader/win32.c

    diff -Naur main2/loader/win32.c main/loader/win32.c
    old new  
    22892289static int WINAPI expGetModuleFileNameA(int module, char* s, int len)
    22902290{
    22912291    WINE_MODREF *mr;
    2292     int result;
     2292    unsigned int result;
    22932293    //printf("File name of module %X (%s) requested\n", module, s);
    22942294
    22952295    if (module == 0 && len >= 12)
  • mencoder.c

    diff -Naur main2/mencoder.c main/mencoder.c
    old new  
    321321                if(len>sh_audio->a_out_buffer_size) len=sh_audio->a_out_buffer_size;
    322322                if(len>sh_audio->a_out_buffer_len){
    323323                    int ret=decode_audio(sh_audio,
    324                         &sh_audio->a_out_buffer[sh_audio->a_out_buffer_len],
     324                        (unsigned char *)&sh_audio->a_out_buffer[sh_audio->a_out_buffer_len],
    325325                        len-sh_audio->a_out_buffer_len,
    326326                        sh_audio->a_out_buffer_size-sh_audio->a_out_buffer_len);
    327327                    if(ret>0) sh_audio->a_out_buffer_len+=ret; else at_eof=1;
     
    562562
    563563#ifdef USE_DVDREAD
    564564if(stream->type==STREAMTYPE_DVD){
    565   if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
    566   if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
     565  if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,(unsigned char *)audio_lang);
     566  if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=dvd_sid_from_lang(stream,(unsigned char *)dvdsub_lang);
    567567}
    568568#endif
    569569
     
    670670if (vobsub_out) {
    671671    unsigned int palette[16], width, height;
    672672    unsigned char tmp[3] = { 0, 0, 0 };
    673     if (spudec_ifo && vobsub_parse_ifo(NULL,spudec_ifo, palette, &width, &height, 1, dvdsub_id, tmp) >= 0)
     673    if (spudec_ifo && vobsub_parse_ifo(NULL,spudec_ifo, palette, &width, &height, 1, dvdsub_id, (char *)tmp) >= 0)
    674674        vobsub_writer = vobsub_out_open(vobsub_out, palette, sh_video->disp_w, sh_video->disp_h,
    675675                                        vobsub_out_id?vobsub_out_id:(char *)tmp, vobsub_out_index);
    676676#ifdef USE_DVDREAD
  • mp3lib/sr1.c

    diff -Naur main2/mp3lib/sr1.c main/mp3lib/sr1.c
    old new  
    178178}
    179179
    180180LOCAL int stream_head_read(unsigned char *hbuf,unsigned long *newhead){
    181   if(mp3_read(hbuf,4) != 4) return FALSE;
     181  if(mp3_read((char *)hbuf,4) != 4) return FALSE;
    182182#if defined(CAN_COMPILE_X86_ASM)
    183183  *newhead = bswap_32(*((unsigned long *)hbuf));
    184184#else
     
    197197
    198198LOCAL int stream_head_shift(unsigned char *hbuf,unsigned long *head){
    199199  *((unsigned long *)hbuf) >>= 8;
    200   if(mp3_read(hbuf+3,1) != 1) return 0;
     200  if(mp3_read((char *)hbuf+3,1) != 1) return 0;
    201201  *head <<= 8;
    202202  *head |= hbuf[3];
    203203  return 1;
     
    299299  bsbuf = bsspace[bsnum]+512;
    300300  bsnum = (bsnum + 1) & 1;
    301301
    302   if( mp3_read(bsbuf,size) != size) return 0; // broken frame
     302  if( mp3_read((char *)bsbuf,size) != size) return 0; // broken frame
    303303
    304304  bitindex = 0;
    305305  wordpointer = (unsigned char *) bsbuf;
  • mplayer.c

    diff -Naur main2/mplayer.c main/mplayer.c
    old new  
    18451845      /* try from ~/.mplayer/sub */
    18461846      if(!vo_vobsub && (psub = get_path( "sub/" ))) {
    18471847          char *bname;
    1848           int l;
     1848          unsigned int l;
    18491849          bname = strrchr(buf,'/');
    18501850#ifdef WIN32
    18511851          if(!bname) bname = strrchr(buf,'\\');
     
    19451945#ifdef USE_DVDREAD
    19461946if(stream->type==STREAMTYPE_DVD){
    19471947  current_module="dvd lang->id";
    1948   if(audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
     1948  if(audio_id==-1) audio_id=dvd_aid_from_lang(stream,(unsigned char *)audio_lang);
    19491949  if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=-1;
    1950   if(dvdsub_lang && dvdsub_id==-1) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
     1950  if(dvdsub_lang && dvdsub_id==-1) dvdsub_id=dvd_sid_from_lang(stream,(unsigned char *)dvdsub_lang);
    19511951  // setup global sub numbering
    19521952  global_sub_indices[SUB_SOURCE_DEMUX] = global_sub_size; // the global # of the first demux-specific sub.
    19531953  global_sub_size += dvd_number_of_subs(stream);
     
    19901990   
    19911991    mp_msg(MSGT_CPLAYER,MSGL_V,"Adding file %s to element entry.\n",playlist_entry);
    19921992
    1993     bname=mp_basename(playlist_entry);
    1994     if ((strlen(bname)>10) && !strncmp(bname,"qt",2) && !strncmp(bname+3,"gateQT",6))
     1993    bname=mp_basename((char *)playlist_entry);
     1994    if ((strlen((char *)bname)>10) && !strncmp(bname,"qt",2) && !strncmp(bname+3,"gateQT",6))
    19951995        continue;
    19961996
    19971997    if (!strncmp(bname,mp_basename(filename),strlen(bname))) // ignoring self-reference
    19981998        continue;
    19991999
    2000     entry = play_tree_new();
     2000   entry = play_tree_new();
    20012001   
    2002     if (filename && !strcmp(mp_basename(playlist_entry),playlist_entry)) // add reference path of current file
     2002    if (filename && !strcmp(mp_basename((char *)playlist_entry),(char *)playlist_entry)) // add reference path of current file
    20032003    {
    2004       temp=malloc((strlen(filename)-strlen(mp_basename(filename))+strlen(playlist_entry)+1)*sizeof(char));
     2004      temp=malloc((strlen(filename)-strlen(mp_basename(filename))+strlen((char *)playlist_entry)+1)*sizeof(char));
    20052005      if (temp)
    20062006      {
    2007         strncpy(temp, filename, strlen(filename)-strlen(mp_basename(filename)));
     2007        strncpy(temp, filename, strlen(filename)-strlen((char *)mp_basename((char *)filename)));
    20082008        temp[strlen(filename)-strlen(mp_basename(filename))]='\0';
    2009         strcat(temp, playlist_entry);
     2009        strcat(temp, (char *)playlist_entry);
    20102010        play_tree_add_file(entry,temp);
    20112011        mp_msg(MSGT_CPLAYER,MSGL_V,"Resolving reference to %s.\n",temp);
    20122012        free(temp);
    20132013      }
    20142014    }
    20152015    else
    2016       play_tree_add_file(entry,playlist_entry);
     2016      play_tree_add_file(entry,(char *)playlist_entry);
    20172017   
    20182018    if(!list)
    20192019      list = entry;
     
    26102610  t=GetTimer();
    26112611  while(sh_audio->a_out_buffer_len<playsize &&
    26122612        (!d_audio->eof || sh_audio->a_in_buffer_len > 0 || sh_audio->a_buffer_len > 0)){
    2613     int ret=decode_audio(sh_audio,&sh_audio->a_out_buffer[sh_audio->a_out_buffer_len],
     2613    int ret=decode_audio(sh_audio,(unsigned char *)&sh_audio->a_out_buffer[sh_audio->a_out_buffer_len],
    26142614        playsize-sh_audio->a_out_buffer_len,sh_audio->a_out_buffer_size-sh_audio->a_out_buffer_len);
    26152615    if(ret<=0) { // EOF?
    26162616      if (d_audio->eof)
     
    30133013        // take the first and the last char out
    30143014        if(use_term_osd) {
    30153015          char msg[128] = MSGTR_Paused;
    3016           int mlen = strlen(msg);
     3016          unsigned int mlen = strlen(msg);
    30173017          msg[mlen-1] = '\0';
    30183018          set_osd_msg(OSD_MSG_PAUSE,1,0,"%s",msg+1);
    30193019          update_osd_msg();
  • playtreeparser.c

    diff -Naur main2/playtreeparser.c main/playtreeparser.c
    old new  
    6969    }
    7070   
    7171    if(p->buffer_size - p->buffer_end > 1 && ! p->stream->eof) {
    72       r = stream_read(p->stream,p->buffer + p->buffer_end,p->buffer_size - p->buffer_end - 1);
     72      r = stream_read(p->stream,(unsigned char*)(p->buffer + p->buffer_end),p->buffer_size - p->buffer_end - 1);
    7373      if(r > 0) {
    7474        p->buffer_end += r;
    7575        p->buffer[p->buffer_end] = '\0';
  • postproc/swscale_template.c

    diff -Naur main2/postproc/swscale_template.c main/postproc/swscale_template.c
    old new  
    22602260    if(!(flags&SWS_FAST_BILINEAR))
    22612261#endif
    22622262    {
    2263         RENAME(hScale)(dst, dstWidth, src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize);
     2263        RENAME(hScale)((int16_t *)dst, dstWidth, src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize);
    22642264    }
    22652265    else // Fast Bilinear upscale / crap downscale
    22662266    {
     
    24442444    if(!(flags&SWS_FAST_BILINEAR))
    24452445#endif
    24462446    {
    2447         RENAME(hScale)(dst     , dstWidth, src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
    2448         RENAME(hScale)(dst+2048, dstWidth, src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
     2447        RENAME(hScale)((int16_t *)dst     , dstWidth, src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
     2448        RENAME(hScale)((int16_t *)dst+2048, dstWidth, src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
    24492449    }
    24502450    else // Fast Bilinear upscale / crap downscale
    24512451    {
     
    27142714                                ASSERT(lastInLumBuf + 1 - srcSliceY < srcSliceH)
    27152715                                ASSERT(lastInLumBuf + 1 - srcSliceY >= 0)
    27162716//                              printf("%d %d\n", lumBufIndex, vLumBufSize);
    2717                                 RENAME(hyscale)(lumPixBuf[ lumBufIndex ], dstW, s, srcW, lumXInc,
     2717                                RENAME(hyscale)((uint16_t *)lumPixBuf[ lumBufIndex ], dstW, s, srcW, lumXInc,
    27182718                                                flags, canMMX2BeUsed, hLumFilter, hLumFilterPos, hLumFilterSize,
    27192719                                                funnyYCode, c->srcFormat, formatConvBuffer,
    27202720                                                c->lumMmx2Filter, c->lumMmx2FilterPos);
     
    27312731                                //FIXME replace parameters through context struct (some at least)
    27322732
    27332733                                if(!(isGray(srcFormat) || isGray(dstFormat)))
    2734                                         RENAME(hcscale)(chrPixBuf[ chrBufIndex ], chrDstW, src1, src2, chrSrcW, chrXInc,
     2734                                        RENAME(hcscale)((uint16_t *)chrPixBuf[ chrBufIndex ], chrDstW, src1, src2, chrSrcW, chrXInc,
    27352735                                                flags, canMMX2BeUsed, hChrFilter, hChrFilterPos, hChrFilterSize,
    27362736                                                funnyUVCode, c->srcFormat, formatConvBuffer,
    27372737                                                c->chrMmx2Filter, c->chrMmx2FilterPos);
     
    27562756                                ASSERT(lumBufIndex < 2*vLumBufSize)
    27572757                                ASSERT(lastInLumBuf + 1 - srcSliceY < srcSliceH)
    27582758                                ASSERT(lastInLumBuf + 1 - srcSliceY >= 0)
    2759                                 RENAME(hyscale)(lumPixBuf[ lumBufIndex ], dstW, s, srcW, lumXInc,
     2759                                RENAME(hyscale)((uint16_t *)lumPixBuf[ lumBufIndex ], dstW, s, srcW, lumXInc,
    27602760                                                flags, canMMX2BeUsed, hLumFilter, hLumFilterPos, hLumFilterSize,
    27612761                                                funnyYCode, c->srcFormat, formatConvBuffer,
    27622762                                                c->lumMmx2Filter, c->lumMmx2FilterPos);
     
    27722772                                ASSERT(lastInChrBuf + 1 - chrSrcSliceY >= 0)
    27732773
    27742774                                if(!(isGray(srcFormat) || isGray(dstFormat)))
    2775                                         RENAME(hcscale)(chrPixBuf[ chrBufIndex ], chrDstW, src1, src2, chrSrcW, chrXInc,
     2775                                        RENAME(hcscale)((uint16_t *)chrPixBuf[ chrBufIndex ], chrDstW, src1, src2, chrSrcW, chrXInc,
    27762776                                                flags, canMMX2BeUsed, hChrFilter, hChrFilterPos, hChrFilterSize,
    27772777                                                funnyUVCode, c->srcFormat, formatConvBuffer,
    27782778                                                c->chrMmx2Filter, c->chrMmx2FilterPos);
     
    28442844                        if(vLumFilterSize == 1 && vChrFilterSize == 2) //Unscaled RGB
    28452845                        {
    28462846                                int chrAlpha= vChrFilter[2*dstY+1];
    2847                                 RENAME(yuv2packed1)(c, *lumSrcPtr, *chrSrcPtr, *(chrSrcPtr+1),
     2847                                RENAME(yuv2packed1)(c, (uint16_t *)*lumSrcPtr, (uint16_t *)*chrSrcPtr, (uint16_t *)*(chrSrcPtr+1),
    28482848                                                 dest, dstW, chrAlpha, dstFormat, flags, dstY);
    28492849                        }
    28502850                        else if(vLumFilterSize == 2 && vChrFilterSize == 2) //BiLinear Upscale RGB
    28512851                        {
    28522852                                int lumAlpha= vLumFilter[2*dstY+1];
    28532853                                int chrAlpha= vChrFilter[2*dstY+1];
    2854                                 RENAME(yuv2packed2)(c, *lumSrcPtr, *(lumSrcPtr+1), *chrSrcPtr, *(chrSrcPtr+1),
     2854                                RENAME(yuv2packed2)(c, (uint16_t *)*lumSrcPtr, (uint16_t *)*(lumSrcPtr+1), (uint16_t *)*chrSrcPtr, (uint16_t *)*(chrSrcPtr+1),
    28552855                                                 dest, dstW, lumAlpha, chrAlpha, dstY);
    28562856                        }
    28572857                        else //General RGB
  • vidix/drivers/pm3_vid.c

    diff -Naur main2/vidix/drivers/pm3_vid.c main/vidix/drivers/pm3_vid.c
    old new  
    283283        frames[i] = (base0 + info->offsets[i]) >> 1;
    284284    }
    285285
    286     compute_scale_factor(&src_w, &drw_w, &shrink, &zoom);
     286    compute_scale_factor(&src_w, &drw_w, (unsigned int *)&shrink, (unsigned int *)&zoom);
    287287
    288288    WRITE_REG(PM3VideoOverlayBase0, base0 >> 1);
    289289    WRITE_REG(PM3VideoOverlayStride, PM3VideoOverlayStride_STRIDE(pitch));
  • vidix/drivers/unichrome_vid.c

    diff -Naur main2/vidix/drivers/unichrome_vid.c main/vidix/drivers/unichrome_vid.c
    old new  
    800800  zoom = 0;
    801801  mini = 0;
    802802  uc_ovl_map_vzoom (src_h, drw_h, &zoom, &mini);
    803   uc_ovl_map_hzoom (src_w, drw_w, &zoom, &mini, &falign, &dcount);
     803  uc_ovl_map_hzoom (src_w, drw_w, &zoom, &mini, (int *)&falign, (int *)&dcount);
    804804  qwfetch = uc_ovl_map_qwfetch (info->fourcc, src_w);
    805805
    806806  /* Calculate buffer sizes */
  • vobsub.c

    diff -Naur main2/vobsub.c main/vobsub.c
    old new  
    12161216}
    12171217
    12181218int
    1219 vobsub_set_from_lang(void *vobhandle, unsigned char * lang)
     1219vobsub_set_from_lang(void *vobhandle, char * lang)
    12201220{
    1221     int i;
     1221    unsigned int i;
    12221222    vobsub_t *vob= (vobsub_t *) vobhandle;
    12231223    while(lang && strlen(lang) >= 2){
    12241224      for(i=0; i < vob->spu_streams_size; i++)