Changeset 5046


Ignore:
Timestamp:
Apr 6, 2015 6:21:41 AM (6 years ago)
Author:
nanang
Message:

Misc (re #1782): Fixed various compile warnings on MacOS & iOS.

Location:
pjproject/trunk/pjmedia/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/silk.c

    r4987 r5046  
    896896 
    897897    if (output->size == 0) { 
    898         output->type = PJMEDIA_TYPE_NONE; 
     898        output->type = PJMEDIA_FRAME_TYPE_NONE; 
    899899        output->buf = NULL; 
    900900        return PJMEDIA_CODEC_EFAILED; 
    901901    } 
    902902 
    903     output->type = PJMEDIA_TYPE_AUDIO; 
     903    output->type = PJMEDIA_FRAME_TYPE_AUDIO; 
    904904    output->timestamp = input->timestamp; 
    905905 
  • pjproject/trunk/pjmedia/src/pjmedia/avi_player.c

    r4537 r5046  
    540540{ 
    541541    pj_assert(streams); 
    542     return (idx >=0 && idx < streams->num_streams ? 
    543             streams->streams[idx] : NULL); 
     542    return (idx < streams->num_streams ? streams->streams[idx] : NULL); 
    544543} 
    545544 
  • pjproject/trunk/pjmedia/src/pjmedia/converter_libyuv.c

    r4875 r5046  
    146146 
    147147#define MAP_CONV_PACK_TO_PACK(src,dst,method) GET_PJ_FORMAT(src),\ 
    148         GET_PJ_FORMAT(dst),CONV_PACK_TO_PACK,method 
     148        GET_PJ_FORMAT(dst),CONV_PACK_TO_PACK,(gen_conv_func)&method 
    149149#define MAP_CONV_PACK_TO_PLANAR(src,dst,method) GET_PJ_FORMAT(src),\ 
    150         GET_PJ_FORMAT(dst),CONV_PACK_TO_PLANAR,method 
     150        GET_PJ_FORMAT(dst),CONV_PACK_TO_PLANAR,(gen_conv_func)&method 
    151151#define MAP_CONV_PLANAR_TO_PACK(src,dst,method) GET_PJ_FORMAT(src),\ 
    152         GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PACK,method 
     152        GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PACK,(gen_conv_func)&method 
    153153#define MAP_CONV_PLANAR_TO_PLANAR(src,dst,method) GET_PJ_FORMAT(src),\ 
    154         GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PLANAR,method 
     154        GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PLANAR,(gen_conv_func)&method 
    155155#define MAP_SCALE_PACK(fmt,method) GET_PJ_FORMAT(fmt),\ 
    156         GET_PJ_FORMAT(fmt),SCALE_PACK,method 
     156        GET_PJ_FORMAT(fmt),SCALE_PACK,(gen_conv_func)&method 
    157157#define MAP_SCALE_PLANAR(fmt,method) GET_PJ_FORMAT(fmt),\ 
    158         GET_PJ_FORMAT(fmt),SCALE_PLANAR,method 
     158        GET_PJ_FORMAT(fmt),SCALE_PLANAR,(gen_conv_func)&method 
    159159 
    160160static fmt_convert_map conv_to_i420[] =  
  • pjproject/trunk/pjmedia/src/pjmedia/vid_codec_util.c

    r4952 r5046  
    400400        } else if (pj_stricmp(&fmtp->param[i].name, &PACKETIZATION_MODE)==0) { 
    401401            tmp = pj_strtoul(&fmtp->param[i].val); 
    402             if (tmp >= 0 && tmp <= 2)  
     402            if (tmp <= 2)  
    403403                h264_fmtp->packetization_mode = (pj_uint8_t)tmp; 
    404404            else 
  • pjproject/trunk/pjmedia/src/pjmedia/vid_port.c

    r5033 r5046  
    3333 
    3434 
     35/* Enable/disable test of finding closest format algo */ 
     36#define ENABLE_TEST_FIND_FMT 0 
     37 
     38 
    3539/** 
    3640 * Enable this to trace the format matching process. 
     
    248252                                       pjmedia_vid_dev_info *di) 
    249253{ 
    250     unsigned i = 0, match_idx = 0, match_fmt = FMT_DIFF_COLOR_SPACE+1; 
     254    unsigned i, match_idx = 0, match_fmt = FMT_DIFF_COLOR_SPACE+1; 
    251255 
    252256    /* Find the matching format. If no exact match is found, find  
     
    254258     * use the first supported format on the list. 
    255259     */ 
    256     for (i; i < di->fmt_cnt; ++i) { 
     260    for (i = 0; i < di->fmt_cnt; ++i) { 
    257261        unsigned tmp_fmt = match_format_id(req_fmt_id, di->fmt[i].id); 
    258262 
     
    380384} 
    381385 
     386#if ENABLE_TEST_FIND_FMT 
    382387/** 
    383388 * This is to test the algo to find the closest fmt 
     
    470475    } 
    471476} 
     477#endif 
    472478 
    473479PJ_DEF(pj_status_t) pjmedia_vid_port_create( pj_pool_t *pool, 
     
    536542        } 
    537543 
    538 #if 0 
     544#if ENABLE_TEST_FIND_FMT 
    539545        test_find_closest_fmt(&di); 
    540546#endif 
Note: See TracChangeset for help on using the changeset viewer.