Index: pjproject/trunk/pjmedia/src/pjmedia-codec/silk.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia-codec/silk.c	(revision 5045)
+++ pjproject/trunk/pjmedia/src/pjmedia-codec/silk.c	(revision 5046)
@@ -896,10 +896,10 @@
 
     if (output->size == 0) {
-        output->type = PJMEDIA_TYPE_NONE;
+        output->type = PJMEDIA_FRAME_TYPE_NONE;
         output->buf = NULL;
         return PJMEDIA_CODEC_EFAILED;
     }
 
-    output->type = PJMEDIA_TYPE_AUDIO;
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
     output->timestamp = input->timestamp;
 
Index: pjproject/trunk/pjmedia/src/pjmedia/avi_player.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/avi_player.c	(revision 5045)
+++ pjproject/trunk/pjmedia/src/pjmedia/avi_player.c	(revision 5046)
@@ -540,6 +540,5 @@
 {
     pj_assert(streams);
-    return (idx >=0 && idx < streams->num_streams ?
-            streams->streams[idx] : NULL);
+    return (idx < streams->num_streams ? streams->streams[idx] : NULL);
 }
 
Index: pjproject/trunk/pjmedia/src/pjmedia/converter_libyuv.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/converter_libyuv.c	(revision 5045)
+++ pjproject/trunk/pjmedia/src/pjmedia/converter_libyuv.c	(revision 5046)
@@ -146,15 +146,15 @@
 
 #define MAP_CONV_PACK_TO_PACK(src,dst,method) GET_PJ_FORMAT(src),\
-        GET_PJ_FORMAT(dst),CONV_PACK_TO_PACK,method
+        GET_PJ_FORMAT(dst),CONV_PACK_TO_PACK,(gen_conv_func)&method
 #define MAP_CONV_PACK_TO_PLANAR(src,dst,method) GET_PJ_FORMAT(src),\
-        GET_PJ_FORMAT(dst),CONV_PACK_TO_PLANAR,method
+        GET_PJ_FORMAT(dst),CONV_PACK_TO_PLANAR,(gen_conv_func)&method
 #define MAP_CONV_PLANAR_TO_PACK(src,dst,method) GET_PJ_FORMAT(src),\
-        GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PACK,method
+        GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PACK,(gen_conv_func)&method
 #define MAP_CONV_PLANAR_TO_PLANAR(src,dst,method) GET_PJ_FORMAT(src),\
-        GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PLANAR,method
+        GET_PJ_FORMAT(dst),CONV_PLANAR_TO_PLANAR,(gen_conv_func)&method
 #define MAP_SCALE_PACK(fmt,method) GET_PJ_FORMAT(fmt),\
-        GET_PJ_FORMAT(fmt),SCALE_PACK,method
+        GET_PJ_FORMAT(fmt),SCALE_PACK,(gen_conv_func)&method
 #define MAP_SCALE_PLANAR(fmt,method) GET_PJ_FORMAT(fmt),\
-        GET_PJ_FORMAT(fmt),SCALE_PLANAR,method
+        GET_PJ_FORMAT(fmt),SCALE_PLANAR,(gen_conv_func)&method
 
 static fmt_convert_map conv_to_i420[] = 
Index: pjproject/trunk/pjmedia/src/pjmedia/vid_codec_util.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/vid_codec_util.c	(revision 5045)
+++ pjproject/trunk/pjmedia/src/pjmedia/vid_codec_util.c	(revision 5046)
@@ -400,5 +400,5 @@
 	} else if (pj_stricmp(&fmtp->param[i].name, &PACKETIZATION_MODE)==0) {
 	    tmp = pj_strtoul(&fmtp->param[i].val);
-	    if (tmp >= 0 && tmp <= 2) 
+	    if (tmp <= 2) 
 		h264_fmtp->packetization_mode = (pj_uint8_t)tmp;
 	    else
Index: pjproject/trunk/pjmedia/src/pjmedia/vid_port.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/vid_port.c	(revision 5045)
+++ pjproject/trunk/pjmedia/src/pjmedia/vid_port.c	(revision 5046)
@@ -33,4 +33,8 @@
 
 
+/* Enable/disable test of finding closest format algo */
+#define ENABLE_TEST_FIND_FMT 0
+
+
 /**
  * Enable this to trace the format matching process.
@@ -248,5 +252,5 @@
 				       pjmedia_vid_dev_info *di)
 {
-    unsigned i = 0, match_idx = 0, match_fmt = FMT_DIFF_COLOR_SPACE+1;
+    unsigned i, match_idx = 0, match_fmt = FMT_DIFF_COLOR_SPACE+1;
 
     /* Find the matching format. If no exact match is found, find 
@@ -254,5 +258,5 @@
      * use the first supported format on the list.
      */
-    for (i; i < di->fmt_cnt; ++i) {
+    for (i = 0; i < di->fmt_cnt; ++i) {
 	unsigned tmp_fmt = match_format_id(req_fmt_id, di->fmt[i].id);
 
@@ -380,4 +384,5 @@
 }
 
+#if ENABLE_TEST_FIND_FMT
 /**
  * This is to test the algo to find the closest fmt
@@ -470,4 +475,5 @@
     }
 }
+#endif
 
 PJ_DEF(pj_status_t) pjmedia_vid_port_create( pj_pool_t *pool,
@@ -536,5 +542,5 @@
 	}
 
-#if 0
+#if ENABLE_TEST_FIND_FMT
 	test_find_closest_fmt(&di);
 #endif
